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

Tim Peters tim_one@email.msn.com
Tue, 25 Jul 2000 17:47:05 -0400


I didn't read this because it doesn't have PEP202 in the Subject line <0.9
wink>.  Nevertheless, FWIW, I prefer

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

too.

> -----Original Message-----
> From: python-dev-admin@python.org [mailto:python-dev-admin@python.org]On
> Behalf Of Fredrik Lundh
> Sent: Tuesday, July 25, 2000 5:01 PM
> To: Skip Montanaro
> Cc: python-dev@python.org
> Subject: Re: [Python-Dev] List comprehension syntax (Features for Python
> 2.0)
>
>
> skip wrote:
> >     Fredrik> yes.
> >
> > 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
>
>     [(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>
>
>
> _______________________________________________
> Python-Dev mailing list
> Python-Dev@python.org
> http://www.python.org/mailman/listinfo/python-dev