Author mjpieters
Recipients docs@python, mjpieters
Date 2014-10-28.22:40:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1414536052.52.0.0865505363528.issue22755@psf.upfronthosting.co.za>
In-reply-to
Content
urllib.request.urlopen() now always produces a context manager (either a HTTPResponse or addinfourl object). The example for contextlib.closing still uses urllib.request.urlopen as an example for the context manager wrapper, see

    https://docs.python.org/3/library/contextlib.html#contextlib.closing

This is confusing users that now expect the object not to be a context manager, see:

    http://stackoverflow.com/questions/26619404/with-and-closing-of-files-in-python

Can a different example be chosen?
History
Date User Action Args
2014-10-28 22:40:52mjpieterssetrecipients: + mjpieters, docs@python
2014-10-28 22:40:52mjpieterssetmessageid: <1414536052.52.0.0865505363528.issue22755@psf.upfronthosting.co.za>
2014-10-28 22:40:52mjpieterslinkissue22755 messages
2014-10-28 22:40:52mjpieterscreate