[Python-Dev] yield * (Re: Missing operator.call)

Georg Brandl g.brandl at gmx.net
Sun Feb 8 11:06:18 CET 2009


glyph at divmod.com schrieb:
> On 01:00 am, greg.ewing at canterbury.ac.nz wrote:
>>Guido van Rossum wrote:
>>>We already have yield expressions and they mean something else...
>>
>>They don't have a "*" in them, though, and I don't
>>think the existing meaning of yield as an expression
>>would carry over into the "yield *" variant, so there
>>shouldn't be any conflict.
>>
>>But if you think there will be a conflict, or that the
>>similarity would be too confusing, maybe the new
>>construct should be called something else. I'm
>>open to suggestions.
> 
> I'm *already* regretting poking my head into this particular bike shed, 
> but...
> 
> has anyone considered the syntax 'yield from iterable'?  i.e.

Yes, basically the "yield *" and "yield from" are the two possibilities
that come up every once in a while.

Would that someone wrote a PEP, so that we can get a decision at some time.

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.



More information about the Python-Dev mailing list