Filip Gruszczyński <grusz...@gmail.com> added the comment: I am sorry. This is the first time I see contextlib and haven't understood, that I should use a function from it. Here is a version with mock object having close method and __getitem__ using contextlib.closing.
---------- Added file: http://bugs.python.org/file21572/11767_3.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