gah! I hate the new string syntax

Tim Peters tim.one at home.com
Sat Mar 3 05:25:15 EST 2001


[Donn Cave]
> ...
> Pseudo-code is the language you don't have to know, to understand,
> right?

No such language.

> Familiar symbols, unambiguous syntax.  Could you articulate
> your thoughts on this, how do list comprehensions improve on their
> alternatives, there?

Donn, listcomps are a minor variant of set-builder notation; in wide use at
latest since the 19th century; in America, it appears this is normally
introduced in the 6th or 7th grades (ages 11-12, for those of you in inferior
countries <wink>).  Search the web, and you'll find intros sprinkled with
cheery encouragements like:

    Math is fun ...
    and who can doubt it ...
    If we have ...
    no doubt about it!!!

(quoted without permission from Miss LeBrocq's Sixth Grade Math Syllabus).

Try explaining compositions of higher-order functions to an 11-year old.
That's "their alternatives" in Python practice -- at least to judge from
Kirby's map-happy code <wink>.

if-listcomps-were-a-bad-idea-i-vote-we-send-the-language-straight-
    to-hell-ly y'rs  - tim





More information about the Python-list mailing list