[docs] [issue34580] sqlite doc: clarify the scope of the context manager
Berker Peksag
report at bugs.python.org
Sat Sep 8 12:23:34 EDT 2018
Berker Peksag <berker.peksag at gmail.com> added the comment:
We always explicitly document what the context manager does even if it simply calls an object's close() method. See https://docs.python.org/3/library/fileinput.html#fileinput.input and https://docs.python.org/3/library/shelve.html#shelve.Shelf for example.
In this case, the documentation already explains what the context manager does after the with block finishes (it also explains the behavior on success and error) with a detailed example.
Would adding a "con.close()" line to the example at https://docs.python.org/3/library/sqlite3.html#using-the-connection-as-a-context-manager clarify the behavior for you?
----------
versions: +Python 3.6, Python 3.7
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34580>
_______________________________________
More information about the docs
mailing list