[Python-checkins] gh-95432: Fixup sqlite3 tutorial example (GH-95431)

miss-islington webhook-mailer at python.org
Fri Jul 29 08:41:51 EDT 2022


https://github.com/python/cpython/commit/30ca6914c7b44b3909270542ad244517c4a9fd1e
commit: 30ca6914c7b44b3909270542ad244517c4a9fd1e
branch: 3.11
author: Miss Islington (bot) <31488909+miss-islington at users.noreply.github.com>
committer: miss-islington <31488909+miss-islington at users.noreply.github.com>
date: 2022-07-29T05:41:46-07:00
summary:

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 at protonmail.com>

files:
M Doc/library/sqlite3.rst

diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst
index 720330fe3f1eb..5e7f103c3f994 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::
 



More information about the Python-checkins mailing list