Jack Diederich <jackd...@gmail.com> added the comment: I like it, but I think it would help to give it the same interface as contextlib.contextmanager (the single function, single yield). Like your mock library 'patch' both function decorators and context managers have an interface that reads like "do this before the real work," "do the real work," and then "do this after the real work" pattern. The fact that the examples and test cases all require an almost empty class feels heavy to me.
---------- nosy: +jackdied _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue9110> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com