report at bugs.python.org
Sat Jul 10 04:23:50 CEST 2010
Jack Diederich <jackdied at 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.
Python tracker <report at bugs.python.org>
More information about the Python-bugs-list