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 desbma
Recipients desbma, docs@python
Date 2015-08-21.20:34:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1440189246.69.0.0632097129757.issue24911@psf.upfronthosting.co.za>
In-reply-to
Content
socket.socket has a context manager to automatically close the socket with the `with` statement: https://hg.python.org/cpython/file/d1bf181afa82/Lib/socket.py#l138

However it is not documented, unlike socket.create_connection.
History
Date User Action Args
2015-08-21 20:34:07desbmasetrecipients: + desbma, docs@python
2015-08-21 20:34:06desbmasetmessageid: <1440189246.69.0.0632097129757.issue24911@psf.upfronthosting.co.za>
2015-08-21 20:34:06desbmalinkissue24911 messages
2015-08-21 20:34:04desbmacreate