[Python-3000] Set literal
Greg Ewing
greg.ewing at canterbury.ac.nz
Sat Feb 2 23:10:25 CET 2008
Stephen J. Turnbull wrote:
> Greg Ewing writes:
>
> > Also, if generator expressions had come first, we
> > would probably never have gotten list comprehensions.
>
> I don't understand. A list comprehension is for when you know you're
> going to want to work with the whole list.
But list(genexp) gives you very nearly the same thing --
so near that I find it hard to imagine anyone would have
thought to suggest a dedicated LC syntax if genexps had
already been present in the language.
And if anyone had, Guido would have said "-1, too many
ways to do it".
--
Greg
More information about the Python-3000
mailing list