[issue11647] function decorated with a context manager can only be invoked once

Nick Coghlan report at bugs.python.org
Tue Mar 29 17:24:32 CEST 2011


Nick Coghlan <ncoghlan at gmail.com> added the comment:

Because I don't want to conflate the two APIs. ContextDecorator can be used with *any* context manager, and some of those may already be using their copy semantics for something else.

If anyone ever writes the __with__ PEP, then ContextDecorator._recreate can be updated to use that, but in the meantime an operation specific internal API is my preferred option.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11647>
_______________________________________


More information about the Python-bugs-list mailing list