[Python-ideas] More alternative names for yield-from

Carl Johnson cmjohnson.mailinglist at gmail.com
Fri Feb 20 12:39:16 CET 2009


On Thu, Feb 19, 2009 at 5:15 PM, Greg Ewing <greg.ewing at canterbury.ac.nz>wrote:

> I want something that means "Do what that stuff
> would have done if I'd written it all out right
> here." Anyone got a really good thesaurus handy?
>

"Macro".

I wonder if this isn't going in the wrong direction. This syntax change is
being considered because there's no way to change the control flow inside of
a function (so that, for example, we can yield multiple items) besides using
one of the existing statements or executing some other function. If there
were, one could just write:

from itertools import yield_from

yield_all_from(gen)

or whatever.

With functions the lack of external regulation on control flow doesn't seem
to be a big deal, but apparently for generators it is… So maybe we need to
think more clearly about what kinds of control flow changes are appropriate
for generators… Is yield from really going to solve all our problems? Or
will we be back for a new keyword in 6 months?

Inconclusively-yours,

-- Carl
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20090220/5e797855/attachment.html>


More information about the Python-ideas mailing list