Issue #13491: Fix many errors in sqlite3 documentation

Initial patch by Johannes Vogel.
This commit is contained in:
Petri Lehtinen 2012-02-15 22:17:21 +02:00
parent 2640b52237
commit 1ca93954e1
10 changed files with 29 additions and 52 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"]