[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/)
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to