New submission from Martijn Pieters: 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? ---------- assignee: docs@python components: Documentation messages: 230184 nosy: docs@python, mjpieters priority: normal severity: normal status: open title: contextlib.closing documentation should use a new example versions: Python 3.4, Python 3.5, Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22755> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com