[Python-Dev] problem with recursive "yield from" delegation

Nick Coghlan ncoghlan at gmail.com
Thu Mar 8 13:07:00 CET 2012


On Thu, Mar 8, 2012 at 9:52 PM, Mark Shannon <mark at hotpy.org> wrote:
> First of all, the semantics described in the PEP do not match the tests.
> If you substitute the supposedly semantically equivalent code
> based on normal yields for each yield from in the test code
> (Lib/test/test_pep380.py) and run it, then it fails.

What's more important is whether or not it matches the semantics of
inlining the subgenerator bodies. The expansion in the PEP was an
attempt to define a way to achieve that in current Python without
interpreter support.

Cheers,
Nick.

-- 
Nick Coghlan   |   ncoghlan at gmail.com   |   Brisbane, Australia


More information about the Python-Dev mailing list