[Python-Dev] PEP 380 ("yield from") is now Final

Terry Reedy tjreedy at udel.edu
Fri Jan 13 23:48:09 CET 2012


On 1/13/2012 7:14 AM, Nick Coghlan wrote:
> print("\n".join(list((lambda:(yield from ("Cheers,", "Nick")))())))

I pulled, rebuilt, and it indeed works (on Win 7).

I just remembered that Tim Peters somewhere (generator.c?) left a large 
comment with examples of recursive generators, such as knight's tours. 
Could these be rewritten with (and benefit from) 'yield from'? (It 
occurs to me his stuff might be worth exposing in an iterator/generator 
how-to.)

-- 
Terry Jan Reedy



More information about the Python-Dev mailing list