• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1import sqlite3
2
3con = sqlite3.connect(":memory:")
4con.row_factory = sqlite3.Row
5
6cur = con.cursor()
7cur.execute("select 'John' as name, 42 as age")
8for row in cur:
9    assert row[0] == row["name"]
10    assert row["name"] == row["nAmE"]
11    assert row[1] == row["age"]
12    assert row[1] == row["AgE"]
13