summaryrefslogtreecommitdiffstats
path: root/Doc/includes/sqlite3/simple_tableprinter.py
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@innova.no>2021-05-19 07:41:19 (GMT)
committerGitHub <noreply@github.com>2021-05-19 07:41:19 (GMT)
commit92d1064727d6b7f4136f9c09ab52ae15e3676afe (patch)
treeae8bf88ce5406adf0d8fc2f0f64f8b20de077142 /Doc/includes/sqlite3/simple_tableprinter.py
parent901443757333a66ff2b5c85eba30dc1c48eac321 (diff)
downloadcpython-92d1064727d6b7f4136f9c09ab52ae15e3676afe.zip
cpython-92d1064727d6b7f4136f9c09ab52ae15e3676afe.tar.gz
cpython-92d1064727d6b7f4136f9c09ab52ae15e3676afe.tar.bz2
bpo-44106: Improve sqlite3 example database contents (GH-26027)
Diffstat (limited to 'Doc/includes/sqlite3/simple_tableprinter.py')
-rw-r--r--Doc/includes/sqlite3/simple_tableprinter.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Doc/includes/sqlite3/simple_tableprinter.py b/Doc/includes/sqlite3/simple_tableprinter.py
index 148a170..9be6e4f 100644
--- a/Doc/includes/sqlite3/simple_tableprinter.py
+++ b/Doc/includes/sqlite3/simple_tableprinter.py
@@ -1,13 +1,10 @@
import sqlite3
FIELD_MAX_WIDTH = 20
-TABLE_NAME = 'people'
-SELECT = 'select * from %s order by age, name_last' % TABLE_NAME
con = sqlite3.connect("mydb")
-
cur = con.cursor()
-cur.execute(SELECT)
+cur.execute("select * from lang order by name, first_appeared")
# Print a header.
for fieldDesc in cur.description: