[Python-checkins] [3.10] Docs: normalize SQL style in sqlite3 docs (GH-96403). (#96409)
erlend-aasland
webhook-mailer at python.org
Tue Aug 30 04:35:27 EDT 2022
https://github.com/python/cpython/commit/af9fbec27e83252b6dc1bb27f228f80319ac85bd
commit: af9fbec27e83252b6dc1bb27f228f80319ac85bd
branch: 3.10
author: Erlend E. Aasland <erlend.aasland at protonmail.com>
committer: erlend-aasland <erlend.aasland at protonmail.com>
date: 2022-08-30T10:35:21+02:00
summary:
[3.10] Docs: normalize SQL style in sqlite3 docs (GH-96403). (#96409)
(cherry picked from commit 6d403e264a7dcd1544a91708f139c6dd8612204d)
Co-authored-by: Erlend E. 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 6d9f929fb59..18a03a26e29 100644
--- a/Doc/library/sqlite3.rst
+++ b/Doc/library/sqlite3.rst
@@ -964,7 +964,7 @@ Cursor objects
("row2",),
]
# cur is an sqlite3.Cursor object
- cur.executemany("insert into data values(?)", rows)
+ cur.executemany("INSERT INTO data VALUES(?)", rows)
.. method:: executescript(sql_script, /)
@@ -982,11 +982,11 @@ Cursor objects
# cur is an sqlite3.Cursor object
cur.executescript("""
- begin;
- create table person(firstname, lastname, age);
- create table book(title, author, published);
- create table publisher(name, address);
- commit;
+ BEGIN;
+ CREATE TABLE person(firstname, lastname, age);
+ CREATE TABLE book(title, author, published);
+ CREATE TABLE publisher(name, address);
+ COMMIT;
""")
More information about the Python-checkins
mailing list