[Python-Dev] accumulator display syntax
Walter Dörwald
walter at livinglogic.de
Tue Oct 21 18:28:51 EDT 2003
Guido van Rossum wrote:
> [...]
> Thanks for trying to bang some sense into this.
>
> Personally, I still like the idea best to make
>
> (x for x in S)
>
> be an iterator comprehension
>
> and
>
> [x for x in S]
>
> syntactic sugar for the common operation
>
> list((x for x in S))
Would this mean:
[x for x in S] is a list comprehension and
[(x for x in S)] is a list containing one generator expression?
Bye,
Walter Dörwald
More information about the Python-Dev
mailing list