A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2005-October/057488.html below:

[Python-Dev] Coroutines, generators, function calling

[Python-Dev] Coroutines, generators, function callingAndrew Koenig ark at acm.org
Fri Oct 21 06:58:28 CEST 2005
> 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.



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4