[Python-ideas] Revised**5 PEP on yield-from

Bruce Frederiksen dangyogi at gmail.com
Sat Feb 21 15:02:49 CET 2009

Greg Ewing wrote:
> It's a problem when trying to specify the semantics
> in terms of an expansion into currently valid Python.
> It's not necessarily a problem in the actual
> implementation, which isn't constrained that way.
Let's not let the limitations of what can be expressed directly in 
Python influence the implementation.  This is just a documentation 
issue.  You can use comments or include some an extra explanation to 
clarify the PEP.  Or you could define it in the PEP as a class (in 
Python), rather than a generator.
>> I still (see example in another thread) think that a missing 'send' 
>> should be
>> treated as a 'next'. To me, the "communicating directly with the 
>> caller" bit
>> is less important than the argument that the caller is still talking 
>> to a
>> generator that *has* a send but may ignore the values sent.
> Yes, I'm starting to think that way, too.
Has anybody shown a use-case for this?

- bruce frederiksen

More information about the Python-ideas mailing list