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

Eric Snow ericsnowcurrently at gmail.com
Sun Oct 14 18:15:26 CEST 2012


On Oct 14, 2012 8:42 AM, "Guido van Rossum" <guido at python.org> wrote:
> Sadly it looks that
>
>   r = yield from (f1(), f2())
>
> ends up interpreting the tuple as the iterator, and you end up with
>
>   r = (f1(), f2())
>
> (i.e., a tuple of generators) rather than the desired
>
>  r = ((yield from f1()), (yield from f2()))

Didn't want this tangent to get lost to the async discussion.  Would it be
too late to make a change along these lines?  Would it be enough of an
improvement to be warranted?

-eric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20121014/59b31713/attachment.html>


More information about the Python-ideas mailing list