iterator expression - please explain
Yermat
loic at fejoz.net
Mon May 24 04:48:34 EDT 2004
Erik Max Francis wrote:
> Helmut Jarausch wrote:
>
>
>>Many thanks for pointing out that silly mistake.
>>But why isn't it legal?
>
>
> It's not legal because you typed it in, rather than cutting and pasting
> it. You meant:
>
> myfun([x**2 for x in xrange(10)])
>
I don't think so ! It seems to be the new feature "generator expression"
or something like that...
See http://www.python.org/peps/pep-0289.html
--
Yermat
More information about the Python-list
mailing list