mirror of
https://github.com/python/cpython.git
synced 2025-10-22 06:32:43 +00:00
Run 2to3 over Doc/lib/sqlite3/.
This commit is contained in:
parent
b942d28bf5
commit
45d569b823
22 changed files with 43 additions and 43 deletions
|
@ -11,7 +11,7 @@ def adapt_point(point):
|
|||
return "%f;%f" % (point.x, point.y)
|
||||
|
||||
def convert_point(s):
|
||||
x, y = map(float, s.split(";"))
|
||||
x, y = list(map(float, s.split(";")))
|
||||
return Point(x, y)
|
||||
|
||||
# Register the adapter
|
||||
|
@ -30,7 +30,7 @@ cur.execute("create table test(p point)")
|
|||
|
||||
cur.execute("insert into test(p) values (?)", (p,))
|
||||
cur.execute("select p from test")
|
||||
print "with declared types:", cur.fetchone()[0]
|
||||
print("with declared types:", cur.fetchone()[0])
|
||||
cur.close()
|
||||
con.close()
|
||||
|
||||
|
@ -42,6 +42,6 @@ cur.execute("create table test(p)")
|
|||
|
||||
cur.execute("insert into test(p) values (?)", (p,))
|
||||
cur.execute('select p as "p [point]" from test')
|
||||
print "with column names:", cur.fetchone()[0]
|
||||
print("with column names:", cur.fetchone()[0])
|
||||
cur.close()
|
||||
con.close()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue