Alexander Belopolsky <belopol...@users.sourceforge.net> added the comment:
I've ran into a problem adding context manager functionality to Profile/Trace objects. When profile/trace function is set in __enter__ and removed in __exit__ it catches two spurious events: a return from __enter__ and a call to __exit__. This is particularly problematic with Profile which is not prepared to handle a return event that does not follow a matching call. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9941> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com