[issue9110] contextlib.ContextDecorator

Jack Diederich report at bugs.python.org
Sat Jul 10 04:40:22 CEST 2010

Jack Diederich <jackdied at gmail.com> added the comment:

Hey Frood,  I'll take another look at it tomorrow when I am less addled.  But as to context managers that are actual classes - I've not written a single one;  they are always generator functions with a simple try/yield/except/finally in the body.  After all state-is-state, and writing an __init__, __enter__, and __exit__ is just extra boilerplate for my common uses.


Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list