14 Oct
2012
14 Oct
'12
7:19 p.m.
On Sun, Oct 14, 2012 at 12:14 PM, Steven D'Aprano <steve@pearwood.info> wrote:
On 15/10/12 03:15, Eric Snow wrote:
On Oct 14, 2012 8:42 AM, "Guido van Rossum"<guido@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()))
How about this?
r = yield from *(f1(), f2())
which currently is a SyntaxError in 3.3.
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()) -- --Guido van Rossum (python.org/~guido)