Filip Gruszczyński <grusz...@gmail.com> added the comment: Here is a new patch, that uses with in __getitem__. I wonder, if we shouldn't check for an AttributeError in case object returned by get_file doesn't have __exit__ method, but does have close and use close instead of with. But it's for you to decide, as I am very fresh to with statement.
---------- Added file: http://bugs.python.org/file21569/11767_2.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11767> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com