Skip to content

Commit 2fbee85

Browse files
gh-95432: Fixup sqlite3 tutorial example (#95431)
- the insert statement should have five placeholders, not four - missing ... in the multiline row list
1 parent a739ee4 commit 2fbee85

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

Doc/library/sqlite3.rst

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -79,11 +79,11 @@ Now, let us insert three more rows of data,
7979
using :meth:`~Cursor.executemany`::
8080

8181
>>> data = [
82-
('2006-03-28', 'BUY', 'IBM', 1000, 45.0),
83-
('2006-04-05', 'BUY', 'MSFT', 1000, 72.0),
84-
('2006-04-06', 'SELL', 'IBM', 500, 53.0),
85-
]
86-
>>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?)', data)
82+
... ('2006-03-28', 'BUY', 'IBM', 1000, 45.0),
83+
... ('2006-04-05', 'BUY', 'MSFT', 1000, 72.0),
84+
... ('2006-04-06', 'SELL', 'IBM', 500, 53.0),
85+
... ]
86+
>>> cur.executemany('INSERT INTO stocks VALUES(?, ?, ?, ?, ?)', data)
8787

8888
Then, retrieve the data by iterating over the result of a ``SELECT`` statement::
8989

0 commit comments

Comments
 (0)