[Python-ideas] yield from multiple iterables (was Re: The async API of the future: yield-from)

Greg Ewing greg.ewing at canterbury.ac.nz
Mon Oct 15 07:10:56 CEST 2012


Guido van Rossum wrote:

> I think it's too early to start proposing new syntax for a problem we
> don't even know is common at all.
> 
> Greg Ewing's proposal works for me:
> 
>   r = yield from par(f1(), f2())

Also, whoever's proposing this needs to understand that even
if the suggested change to yield-from were made, it would NOT
automatically result in par() behaviour. It would just be
another way of sequentially calling two sub-generators.

-- 
Greg




More information about the Python-ideas mailing list