Message132096
> > 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? |
|
Date |
User |
Action |
Args |
2011-03-25 14:50:13 | ysj.ray | set | recipients:
+ ysj.ray, ncoghlan, pitrou, michael.foord |
2011-03-25 14:50:13 | ysj.ray | set | messageid: <1301064613.33.0.195955542803.issue11647@psf.upfronthosting.co.za> |
2011-03-25 14:50:11 | ysj.ray | link | issue11647 messages |
2011-03-25 14:50:11 | ysj.ray | create | |
|