This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author berker.peksag
Recipients berker.peksag, docs@python, ghaering, vigdis, xtreak
Date 2018-09-08.16:23:34
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1536423814.43.0.56676864532.issue34580@psf.upfronthosting.co.za>
In-reply-to
Content
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?
History
Date User Action Args
2018-09-08 16:23:34berker.peksagsetrecipients: + berker.peksag, ghaering, docs@python, xtreak, vigdis
2018-09-08 16:23:34berker.peksagsetmessageid: <1536423814.43.0.56676864532.issue34580@psf.upfronthosting.co.za>
2018-09-08 16:23:34berker.peksaglinkissue34580 messages
2018-09-08 16:23:34berker.peksagcreate