iterator expression - please explain

Erik Max Francis max at alcyone.com
Mon May 24 04:41:22 EDT 2004


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)])

-- 
 __ Erik Max Francis && max at alcyone.com && http://www.alcyone.com/max/
/  \ San Jose, CA, USA && 37 20 N 121 53 W && AIM erikmaxfrancis
\__/ Chastity the most unnatural of the sexual perversions.
    -- Aldous Huxley



More information about the Python-list mailing list