Generator expressions v/s list comprehensions
Steve Holden
sholden at holdenweb.com
Tue Aug 31 07:12:40 EDT 2004
Alex Martelli wrote:
> 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).
>
Indeed, and the reason I like Python is that it has some aspects of Icon
mixed in with perhaps the most easily-accessible object-oriented
features of any of the programming languages I've learned.
>
>
>>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.
>
... which it clearly isn't :-).
I do think the Python community is just a little out-of-the-ordinary,
which is what keeps me (and, I suspect, you: great to see you on the
wires again) coming back to c.l.py.
regards
Steve
More information about the Python-list
mailing list