diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-07-29 12:41:46 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-29 12:41:46 (GMT) |
commit | 30ca6914c7b44b3909270542ad244517c4a9fd1e (patch) | |
tree | 86fb8e856001ae3488d869ce4a99eb5994f8d70e | |
parent | efeda8b4a1fd8f1c510311c40e46d5fad65512a0 (diff) | |
download | cpython-30ca6914c7b44b3909270542ad244517c4a9fd1e.zip cpython-30ca6914c7b44b3909270542ad244517c4a9fd1e.tar.gz cpython-30ca6914c7b44b3909270542ad244517c4a9fd1e.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>
-rw-r--r-- | Doc/library/sqlite3.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 720330f..5e7f103 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:: |