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/execsql_printall_1.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/execsql_printall_1.py')
-rw-r--r-- | Doc/includes/sqlite3/execsql_printall_1.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/includes/sqlite3/execsql_printall_1.py b/Doc/includes/sqlite3/execsql_printall_1.py index a4ce5c52814..19306e6e3ca 100644 --- a/Doc/includes/sqlite3/execsql_printall_1.py +++ b/Doc/includes/sqlite3/execsql_printall_1.py @@ -11,3 +11,5 @@ cur.execute("select * from people order by age") # Retrieve all rows as a sequence and print that sequence: print(cur.fetchall()) + +con.close() |