Docs: normalize SQL style in sqlite3 docs (GH-96403)
![](https://secure.gravatar.com/avatar/cc7737cd64a84f1b5c61a160798e97ee.jpg?s=120&d=mm&r=g)
https://github.com/python/cpython/commit/4cfb6395e18b4846e92c9f685d534e6ec17... commit: 4cfb6395e18b4846e92c9f685d534e6ec17822a2 branch: 3.11 author: Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> committer: miss-islington <31488909+miss-islington@users.noreply.github.com> date: 2022-08-29T15:59:13-07:00 summary: Docs: normalize SQL style in sqlite3 docs (GH-96403) (cherry picked from commit 6d403e264a7dcd1544a91708f139c6dd8612204d) Co-authored-by: Erlend E. Aasland <erlend.aasland@protonmail.com> files: M Doc/library/sqlite3.rst diff --git a/Doc/library/sqlite3.rst b/Doc/library/sqlite3.rst index 50499b001e2..21ad3540ccb 100644 --- a/Doc/library/sqlite3.rst +++ b/Doc/library/sqlite3.rst @@ -384,7 +384,7 @@ Module functions ... print(f"Error message: {unraisable.err_msg}") >>> import sys >>> sys.unraisablehook = debug - >>> cur = con.execute("select 1") + >>> cur = con.execute("SELECT 1") ZeroDivisionError('division by zero') in callback evil_trace Error message: None @@ -1206,7 +1206,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, /) @@ -1224,11 +1224,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; """)
participants (1)
-
miss-islington