Mercurial > cpython-lru_cache-weakref
view Doc/includes/sqlite3/rowclass.py @ 86127:a3d09c19bb93
merge with 3.3
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Sun, 06 Oct 2013 19:24:00 +0200 |
| parents | 9eb77d455be1 |
| children |
line wrap: on
line source
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"]
