Serhiy Storchaka added the comment: I think it will be better to call the close() method from the __exit__() method using _PyObject_CallMethodId(). It will allow to overload the close() method and get working context manager without overloading the __exit__() method. See issue16488 for example.
---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue11287> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com