[Python-Dev] List comprehension syntax (Features for Python 2.0)

Eric S. Raymond esr@thyrsus.com
Tue, 25 Jul 2000 17:57:59 -0400


M.-A. Lemburg <mal@lemburg.com>:
> I believe the above would cause much less confusion since
> it resembles standard Python "for" loop notation (making it
> intuitive for Python programmers) and is in syntax very
> similar to what "lambda" uses:
> 
>     lambda <vars>: <evaluated expr>
> 
> List comprehension would then become something like:
> 
>     [for <vars> in <expr>: <evaluated expr>]

I agree with this proposal.  It harmonizes well with the use of applicative
or functional notation.
-- 
		<a href="http://www.tuxedo.org/~esr">Eric S. Raymond</a>

To make inexpensive guns impossible to get is to say that you're
putting a money test on getting a gun.  It's racism in its worst form.
        -- Roy Innis, president of the Congress of Racial Equality (CORE), 1988