diff options
author | Petri Lehtinen <petri@digip.org> | 2012-02-15 20:17:21 (GMT) |
---|---|---|
committer | Petri Lehtinen <petri@digip.org> | 2012-02-15 20:21:01 (GMT) |
commit | 1ca93954e17e4f6f1230306997badbda3e5c68bc (patch) | |
tree | f00db8a6e8095c9b5470db3ae6fae16bf6cd64fa /Doc/includes/sqlite3/rowclass.py | |
parent | 2640b5223765f7a8e9c13a4a4c82dafa2c7cb59a (diff) | |
download | cpython-1ca93954e17e4f6f1230306997badbda3e5c68bc.zip cpython-1ca93954e17e4f6f1230306997badbda3e5c68bc.tar.gz cpython-1ca93954e17e4f6f1230306997badbda3e5c68bc.tar.bz2 |
Issue #13491: Fix many errors in sqlite3 documentation
Initial patch by Johannes Vogel.
Diffstat (limited to 'Doc/includes/sqlite3/rowclass.py')
-rw-r--r-- | Doc/includes/sqlite3/rowclass.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/includes/sqlite3/rowclass.py b/Doc/includes/sqlite3/rowclass.py index 3fa0b87..92b5ad6 100644 --- a/Doc/includes/sqlite3/rowclass.py +++ b/Doc/includes/sqlite3/rowclass.py @@ -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"] |