diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-05-20 03:22:20 +0530 |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2019-05-20 00:52:20 +0300 |
commit | 287b84de939db47aa8c6f30734ceb8aba9d1db29 (patch) | |
tree | 0c492acbe1135b59f30a0dc8aa5bfd0705387371 /Doc/includes/sqlite3/parse_colnames.py | |
parent | 5c08ce9bf712acbb3f05a3a57baf51fcb534cdf0 (diff) | |
download | cpython-287b84de939db47aa8c6f30734ceb8aba9d1db29.tar.gz cpython-287b84de939db47aa8c6f30734ceb8aba9d1db29.zip |
bpo-34580: Update sqlite3 examples to call close() explicitly (GH-9079)
The sqlit3.Connection object doesn't call its close() method when it's used
as a context manager.
Diffstat (limited to 'Doc/includes/sqlite3/parse_colnames.py')
-rw-r--r-- | Doc/includes/sqlite3/parse_colnames.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/includes/sqlite3/parse_colnames.py b/Doc/includes/sqlite3/parse_colnames.py index cc68c76459e..5f01dbfe1cb 100644 --- a/Doc/includes/sqlite3/parse_colnames.py +++ b/Doc/includes/sqlite3/parse_colnames.py @@ -6,3 +6,5 @@ cur = con.cursor() cur.execute('select ? as "x [timestamp]"', (datetime.datetime.now(),)) dt = cur.fetchone()[0] print(dt, type(dt)) + +con.close() |