[Python-Dev] Merging PEP 310 and PEP 340-redux?
Guido van Rossum
gvanrossum at gmail.com
Sat May 14 02:28:14 CEST 2005
[Guido van Rossum]
> > So then the all-important question I want to pose is: do we like the
> > idea of using a (degenerate, decorated) generator as a "template" for
> > the do-statement enough to accept the slightly increased complexity?
[Greg Ewing]
> I can't see how this has anything to do with whether
> a generator is used or not. Keeping them separate
> seems to be a useful thing in its own right.
Assuming by "them" you mean the value of EXPR and the value assigned
to VAR, I don't care how this conclusion is reached, as long as their
separation is seen as a useful thing. :-)
I came up with the idea of making them separate when I tried to figure
out how to decorate a generator to drive a PEP-310-style
with-statement, and found I couldn't do it for the opening() example.
(Michael Hudson illustrated this nicely in his reply in this thread.
:-)
But it's fine if the separation is considered generally useful even
without thinking of generators.
--
--Guido van Rossum (home page: http://www.python.org/~guido/)
More information about the Python-Dev
mailing list