Senthil Kumaran <sent...@uthcode.com> added the comment: I forgot completely, but in Python3, Issue5418 had already added support to addinfourl. It is now possible to write code like
import urllib.request with urllib.request.urlopen('http://www.python.org') as req: res = req.read() But yeah, unlike normal file objects, it not a strict requirement for closing those objects as they will be closed when socket connection is closed. This is available only 3.x series and I think, a documentation update should be fine and this report can be closed. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12365> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com