mirror of
https://github.com/python/cpython.git
synced 2024-12-01 03:01:36 +01:00
1ca93954e1
Initial patch by Johannes Vogel.
13 lines
299 B
Python
13 lines
299 B
Python
import sqlite3
|
|
|
|
con = sqlite3.connect(":memory:")
|
|
con.row_factory = sqlite3.Row
|
|
|
|
cur = con.cursor()
|
|
cur.execute("select 'John' as name, 42 as age")
|
|
for row in cur:
|
|
assert row[0] == row["name"]
|
|
assert row["name"] == row["nAmE"]
|
|
assert row[1] == row["age"]
|
|
assert row[1] == row["AgE"]
|