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

Fredrik Lundh Fredrik Lundh" <effbot@telia.com
Tue, 25 Jul 2000 23:01:18 +0200


skip wrote:
>     Fredrik> yes.
>=20
> That was my initial reaction, which was why I didn't post it when I =
had the
> idea, only when I saw your interpretation...

fwiw, the syntax implemented by the patch is the best
one I've seen this far.  it wasn't that syntax I had in mind
when I talked about list confusions...

:::

however, I think I prefer=20

    [(x, x*2) for x in seq]

over

    [x, x*2 for x in seq]

(it doesn't only help me scan it, it also simplifies a piece of
code that I happen to have here...)

the bot says +0.

</F>