Generator expressions v/s list comprehensions

Alex Martelli aleaxit at yahoo.com
Tue Aug 31 13:04:14 CEST 2004


Michael J. Fromberger <Michael.J.Fromberger at Clothing.Dartmouth.EDU>
wrote:
   ...
> > Unfortunately, this wish is totally unrealistic -- obviously people do
> > come up with cool ideas such as the iterator protocol, and generators,
> > after the language has been around for a while.  
> 
> All the cool features Python has adopted existed a long time before they
> made their way into Python itself.

Almost all, not all.  As I repeatedly explained, for example, generator
comprehensions are not quite like anything in other languages (though
you can surely find _similarities_, of course).


> Frankly, I think if the Lisp world had managed to build the same 
> friendly and welcoming community Python seems to have, it would have 
> taken over the world a quarter-century ago.

I think most people's reaction to (==against) Lisp's parentheses and
prefix syntax is more intense than that to Python's significant
whitespace, which appears quite natural to most non-programmers even
though many programmers inured to block delimiters do react strongly
against it.  It's hard enough for Python to keep its community welcoming
and friendly when you hear some clueless dweeb rant against indendation
for the thousandth time, I think the Lisp community would have had to be
made up of saints to be still friendly and welcoming after a _million_
newcomers raised their whining against parentheses.


Alex



More information about the Python-list mailing list