No subject

Steven Bethard steven.bethard at gmail.com
Mon Nov 1 02:25:46 EST 2004


Bengt Richter <bokr <at> oz.net> writes:
> 
> Well, I don't have 2.4 yet, but what does it do?

>>> [x for x in [0] for x in iter(lambda:x+1, 4)]
[1, 2, 3]
>>> list(x for x in [0] for x in iter(lambda:x+1, 4))
[1, 2, 3]

Looks like it does just what you'd hope it would do.  =)

Steve




More information about the Python-list mailing list