[Python-3000] Set literal

Stephen J. Turnbull stephen at xemacs.org
Sat Feb 2 03:16:16 CET 2008


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.  Similarly (even more so)
for dictionary comprehensions.  List comprehension can be defined in
terms of a genexp, of course, but ISTM it's a worthwhile addition to
the language in its own right.



More information about the Python-3000 mailing list