Senthil Kumaran <sent...@uthcode.com> added the comment: It should be documented that in 2.x series the file-like object does not support context management protocol. I have added the superseder issue number, please see the note as if you really want in 2.x, how you can have it using contextlib and in 3.x the context management protocol support is available.
---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> URLopener should support context manager protocol _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue12487> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com