summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorErlend Egeberg Aasland <erlend.aasland@protonmail.com>2022-07-29 12:31:41 (GMT)
committerGitHub <noreply@github.com>2022-07-29 12:31:41 (GMT)
commit2fbee85931296bbeddae6358583e400ce5321f89 (patch)
tree127f11c5d003c55392b8c120eedda17926abf59d
parenta739ee412cb2342554a70f30faaa3b7752bbd0a4 (diff)
downloadcpython-2fbee85931296bbeddae6358583e400ce5321f89.zip
cpython-2fbee85931296bbeddae6358583e400ce5321f89.tar.gz
cpython-2fbee85931296bbeddae6358583e400ce5321f89.tar.bz2
gh-95432: Fixup sqlite3 tutorial example (#95431)
- the insert statement should have five placeholders, not four - missing ... in the multiline row list
-rw-r--r--Doc/library/sqlite3.rst10
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 6a430f0..3df41b5 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -79,11 +79,11 @@ Now, let us insert three more rows of data,
using :meth:`~Cursor.executemany`::
>>> data = [
- ('2006-03-28', 'BUY', 'IBM', 1000, 45.0),
- ('2006-04-05', 'BUY', 'MSFT', 1000, 72.0),
- ('2006-04-06', 'SELL', 'IBM', 500, 53.0),
- ]
- >>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?)', data)
+ ... ('2006-03-28', 'BUY', 'IBM', 1000, 45.0),
+ ... ('2006-04-05', 'BUY', 'MSFT', 1000, 72.0),
+ ... ('2006-04-06', 'SELL', 'IBM', 500, 53.0),
+ ... ]
+ >>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?, ?)', data)
Then, retrieve the data by iterating over the result of a ``SELECT`` statement::