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-25.14:50:11
SpamBayes Score 1.3033295e-07
Marked as misclassified No
Message-id <1301064613.33.0.195955542803.issue11647@psf.upfronthosting.co.za>
In-reply-to
Content
> > Agreed with nick's idea, the implicitly recreation of the context
> > managers would confuse users.

> Uh, why would it? That's exactly what I expect the decorator to do, and
> I was astonished to discover that it *doesn't*.


Because there is no *OBVIOUS* code or sign which can illustrate that context manager changes from a one-shot to a reusable. When using in "with" statement, it's a one-shot, while using as a decorator, it becomes a reusable. I think the way using it doesn't provide enough reason for its behavior change. Is there somebody who may expected that the GeneratorContextManager IS a one-shot?
History
Date User Action Args
2011-03-25 14:50:13ysj.raysetrecipients: + ysj.ray, ncoghlan, pitrou, michael.foord
2011-03-25 14:50:13ysj.raysetmessageid: <1301064613.33.0.195955542803.issue11647@psf.upfronthosting.co.za>
2011-03-25 14:50:11ysj.raylinkissue11647 messages
2011-03-25 14:50:11ysj.raycreate