Ray.Allen <ysj....@gmail.com> added the comment:

> > 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?

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue11647>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to