This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author ysj.ray
Recipients michael.foord, ncoghlan, pitrou, ysj.ray
Date 2011-03-29.08:33:33
SpamBayes Score 0.0058982964
Marked as misclassified No
Message-id <1301387614.67.0.317302109133.issue11647@psf.upfronthosting.co.za>
In-reply-to
Content
Here I worked out a patch to make the function decorated by context manager returned by @contextmanager reusable, by storing original function object and argments(args, kwds objects) in _GeneratorContextManager and construct a generator when needed(in self.__enter__ while used as a context manager and self.__call__ while used as a decorator). It still inherit ContextDecorator to keep class inheritation complete and the __call__ method is override.
History
Date User Action Args
2011-03-29 08:33:34ysj.raysetrecipients: + ysj.ray, ncoghlan, pitrou, michael.foord
2011-03-29 08:33:34ysj.raysetmessageid: <1301387614.67.0.317302109133.issue11647@psf.upfronthosting.co.za>
2011-03-29 08:33:33ysj.raylinkissue11647 messages
2011-03-29 08:33:33ysj.raycreate