mirror of
https://github.com/python/cpython.git
synced 2025-10-28 01:00:34 +00:00
Issue #13491: Fix many errors in sqlite3 documentation
Initial patch by Johannes Vogel.
This commit is contained in:
parent
2640b52237
commit
1ca93954e1
10 changed files with 29 additions and 52 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