[Python-ideas] Yet another alternative name for yield-from

Guido van Rossum guido at python.org
Thu Apr 2 20:44:57 CEST 2009

On Thu, Apr 2, 2009 at 11:37 AM, Jacob Holm <jh at improva.dk> wrote:
> Bruce Frederiksen wrote:
>> Guido van Rossum wrote:
>>> but how about 'return from'?
>> or 'return finally'?(??) ...
> Or what about "yield return"? That clearly marks the construct as belonging
> in a generator. It also mixes well with the idea of a "yield raise" that I
> mentioned in another mail (not a suggestion for this PEP).

Not totally weird. After all Dave Beazley's trampoline uses "yield
g()" to call a sub-generator and "yield x" to return a value x from a
sub-generator to the calling generator via the trampoline's stack...

--Guido van Rossum (home page: http://www.python.org/~guido/)

More information about the Python-ideas mailing list