diff options
author | Xtreak <tir.karthi@gmail.com> | 2019-05-19 21:52:20 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2019-05-19 21:52:20 (GMT) |
commit | 287b84de939db47aa8c6f30734ceb8aba9d1db29 (patch) | |
tree | 0c492acbe1135b59f30a0dc8aa5bfd0705387371 /Doc/includes/sqlite3/adapter_point_1.py | |
parent | 5c08ce9bf712acbb3f05a3a57baf51fcb534cdf0 (diff) | |
download | cpython-287b84de939db47aa8c6f30734ceb8aba9d1db29.zip cpython-287b84de939db47aa8c6f30734ceb8aba9d1db29.tar.gz cpython-287b84de939db47aa8c6f30734ceb8aba9d1db29.tar.bz2 |
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/adapter_point_1.py')
-rw-r--r-- | Doc/includes/sqlite3/adapter_point_1.py | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/includes/sqlite3/adapter_point_1.py b/Doc/includes/sqlite3/adapter_point_1.py index 6b1af84..77daf8f 100644 --- a/Doc/includes/sqlite3/adapter_point_1.py +++ b/Doc/includes/sqlite3/adapter_point_1.py @@ -14,3 +14,5 @@ cur = con.cursor() p = Point(4.0, -3.2) cur.execute("select ?", (p,)) print(cur.fetchone()[0]) + +con.close() |