Reading List Comprehension?

Stephen Hansen stephen at
Thu Sep 7 06:53:44 CEST 2000

Whee. Python 2.0. I'm estatic, so go to check out what's changed...

Augmented assignments.. Ugly, more operators, but obviousely needed for
certain circumstances.. And y'know, I do admit to getting a tiny bit tired
of 'a = a + 1' sometimes... I just hope we don't get increment/decrement
operators next. :)

The new print syntax is IMHO a useful, intelligent extention of the print
syntax; and it's obviousely pronounced 'print to file, text'.. Not perfect 
english, but good enough :)

But..list comprehensions.. I can't quite fathom.

--> x for subseq in seq for x in subseq
Eh?!?! That looks so..wrong. No whitespace, parens, no nothing, with
all those keywords mixed in there. I can't pronounce it, or make any
sense outat it. Maybe that's because the examples insisted upon using
exponential syntax, instead of something simple like addition. :)

I don't know -- is there a more in depth, vastly basic, tutorial to
what the heck these things are somewhere? It,


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =----- - The #1 Newsgroup Service in the World!
-----==  Over 80,000 Newsgroups - 16 Different Servers! =-----

More information about the Python-list mailing list