summaryrefslogtreecommitdiffstats
path: root/Doc/library/sqlite3.rst
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2022-07-29 12:38:08 (GMT)
committerGitHub <noreply@github.com>2022-07-29 12:38:08 (GMT)
commit3417ce3489d68f4bc6d85b3fc280523eb90eab62 (patch)
tree6ebfcf8e8569be48bdb1efc9c8f51c567855144c /Doc/library/sqlite3.rst
parent18418858b2cfca221613af1c58bf657f8bfb6d6c (diff)
downloadcpython-3417ce3489d68f4bc6d85b3fc280523eb90eab62.zip
cpython-3417ce3489d68f4bc6d85b3fc280523eb90eab62.tar.gz
cpython-3417ce3489d68f4bc6d85b3fc280523eb90eab62.tar.bz2
gh-95432: Fixup sqlite3 tutorial example (GH-95431)
- the insert statement should have five placeholders, not four - missing ... in the multiline row list (cherry picked from commit 2fbee85931296bbeddae6358583e400ce5321f89) Co-authored-by: Erlend Egeberg Aasland <erlend.aasland@protonmail.com>
Diffstat (limited to 'Doc/library/sqlite3.rst')
-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 32a5cfe..061207b 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::