Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Address review: drop unneeded constants
  • Loading branch information
Erlend E. Aasland committed May 11, 2021
commit 64b992333c1f72b029b7a7d6065630699dbe3764
5 changes: 1 addition & 4 deletions Doc/includes/sqlite3/simple_tableprinter.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
import sqlite3

FIELD_MAX_WIDTH = 20
TABLE_NAME = 'lang'
SELECT = f'select * from {TABLE_NAME} order by name, first_appeared'

con = sqlite3.connect("mydb")

cur = con.cursor()
cur.execute(SELECT)
cur.execute(f"select * from lang order by name, first_appeared")

# Print a header.
for fieldDesc in cur.description:
Expand Down