PEP 289: Generator Expressions (please comment)

Chris Perkins chrisperkins37 at hotmail.com
Fri Oct 24 08:42:44 EDT 2003


Raymond Hettinger:
>
>     http://www.python.org/peps/pep-0289.html
> 

I like it. This made me realize that list comprehension sytax is a
special case that never really needed to be special-cased.

In fact, list comprehensions themselves become redundant syntactic
sugar under the new proposal:

[foo(x) for x in bar] ==> list(foo(x) for x in bar)

Chris Perkins




More information about the Python-list mailing list