sqlite3: Port relevant documentation changes from 3.2

Initial patch by Johannes Vogel. Issue #13491.
This commit is contained in:
Petri Lehtinen 2012-03-01 21:28:00 +02:00
parent c56bca31e9
commit a15a8d2a0c
8 changed files with 36 additions and 48 deletions

View file

@ -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"]