mirror of
https://github.com/python/cpython.git
synced 2025-08-18 07:41:05 +00:00
sqlite3: Port relevant documentation changes from 3.2
Initial patch by Johannes Vogel. Issue #13491.
This commit is contained in:
parent
c56bca31e9
commit
a15a8d2a0c
8 changed files with 36 additions and 48 deletions
|
@ -1,12 +1,12 @@
|
|||
import sqlite3
|
||||
|
||||
con = sqlite3.connect("mydb")
|
||||
con = sqlite3.connect(":memory:")
|
||||
con.row_factory = sqlite3.Row
|
||||
|
||||
cur = con.cursor()
|
||||
cur.execute("select name_last, age from people")
|
||||
cur.execute("select 'John' as name, 42 as age")
|
||||
for row in cur:
|
||||
assert row[0] == row["name_last"]
|
||||
assert row["name_last"] == row["nAmE_lAsT"]
|
||||
assert row[0] == row["name"]
|
||||
assert row["name"] == row["nAmE"]
|
||||
assert row[1] == row["age"]
|
||||
assert row[1] == row["AgE"]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue