summaryrefslogtreecommitdiffstats
path: root/Doc/lib/sqlite3/adapter_point_2.py
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/lib/sqlite3/adapter_point_2.py')
-rw-r--r--Doc/lib/sqlite3/adapter_point_2.py17
1 files changed, 0 insertions, 17 deletions
diff --git a/Doc/lib/sqlite3/adapter_point_2.py b/Doc/lib/sqlite3/adapter_point_2.py
deleted file mode 100644
index 1e1719a..0000000
--- a/Doc/lib/sqlite3/adapter_point_2.py
+++ /dev/null
@@ -1,17 +0,0 @@
-import sqlite3
-
-class Point(object):
- def __init__(self, x, y):
- self.x, self.y = x, y
-
-def adapt_point(point):
- return "%f;%f" % (point.x, point.y)
-
-sqlite3.register_adapter(Point, adapt_point)
-
-con = sqlite3.connect(":memory:")
-cur = con.cursor()
-
-p = Point(4.0, -3.2)
-cur.execute("select ?", (p,))
-print(cur.fetchone()[0])