newbie q

Christos TZOTZIOY Georgiou tzot at sil-tec.gr
Fri Jan 14 08:57:48 EST 2005


On Fri, 14 Jan 2005 00:08:09 GMT, rumours say that bokr at oz.net (Bengt
Richter) might have written:

>As I'm sure you know, with 2.4's generator expressions you
>don't have to build the temporary list.
>Which could be important if 'something'
>is (or generates) a huge sequence.
>
>      for i in (x[0] for x in something):

and for some functional fun:

from itertools import imap
from operator import itemgetter
for i in imap(itemgetter(0), something):
-- 
TZOTZIOY, I speak England very best.
"Be strict when sending and tolerant when receiving." (from RFC1958)
I really should keep that in mind when talking with people, actually...



More information about the Python-list mailing list