From 28cfb0eca7331e2c38d744d8803a66ad6f42a7fd Mon Sep 17 00:00:00 2001 From: Erlend Egeberg Aasland Date: Fri, 29 Jul 2022 14:31:41 +0200 Subject: [PATCH] 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 --- Doc/library/sqlite3.rst | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 32a5cfe2fb10da..061207b59249b5 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::