diff options
| author | Erlend E. Aasland <erlend.aasland@protonmail.com> | 2022-08-31 05:54:54 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-08-31 05:54:54 (GMT) |
| commit | f7e7bf161aaec5a5cffdcec7c97e1f09e445421b (patch) | |
| tree | e9d339cca5899de4dd2fed407baad75af2631d96 /Doc/includes/sqlite3/adapter_point_1.py | |
| parent | 8ba22b90cafdf83d26318905a021311c6932d2c0 (diff) | |
| download | cpython-f7e7bf161aaec5a5cffdcec7c97e1f09e445421b.zip cpython-f7e7bf161aaec5a5cffdcec7c97e1f09e445421b.tar.gz cpython-f7e7bf161aaec5a5cffdcec7c97e1f09e445421b.tar.bz2 | |
gh-96414: Inline code examples in sqlite3 docs (#96442)
Diffstat (limited to 'Doc/includes/sqlite3/adapter_point_1.py')
| -rw-r--r-- | Doc/includes/sqlite3/adapter_point_1.py | 18 |
1 files changed, 0 insertions, 18 deletions
diff --git a/Doc/includes/sqlite3/adapter_point_1.py b/Doc/includes/sqlite3/adapter_point_1.py deleted file mode 100644 index 77daf8f..0000000 --- a/Doc/includes/sqlite3/adapter_point_1.py +++ /dev/null @@ -1,18 +0,0 @@ -import sqlite3 - -class Point: - def __init__(self, x, y): - self.x, self.y = x, y - - def __conform__(self, protocol): - if protocol is sqlite3.PrepareProtocol: - return "%f;%f" % (self.x, self.y) - -con = sqlite3.connect(":memory:") -cur = con.cursor() - -p = Point(4.0, -3.2) -cur.execute("select ?", (p,)) -print(cur.fetchone()[0]) - -con.close() |
