> so the new syntax would
> not be useful, unless it was something that provided access to the index
> item as a variable, like:
>
> yield foo(i) for i in x
>
> which barely saves you anything (a colon, a newline, and an indent).
Not even that, because you can omit the newline and indent:
for i in x: yield foo(i)
There's a bigger difference between
for i in x: yield i
and
yield from x
Moreover, I can imagine optimization opportunities for "yield from" that
would not make sense in the context of comprehensions.
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com