Greg Ewing schrieb:
> 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".

Hm, but wouldn't he then have removed list comprehensions
by now using the time machine?

Georg

-- 
Thus spake the Lord: Thou shalt indent with four spaces. No more, no less.
Four shall be the number of spaces thou shalt indent, and the number of thy
indenting shall be four. Eight shalt thou not indent, nor either indent thou
two, excepting that thou then proceed to four. Tabs are right out.

_______________________________________________
Python-3000 mailing list
Python-3000@python.org
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe: 
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com

Reply via email to