NEWBIE: for statement in "dive into python" gives syntax error.

Chris Liechti cliechti at gmx.net
Tue Jul 23 16:23:39 EDT 2002


Mack <gugabbe at hotmail.com> wrote in news:ahkcj0$gcg$1 at green.tninet.se:
>> That's a list comprehension, which wasn't available in 1.5.2. I think it
>> first appeared in 2.0. Upgrading to a more recent Python version should
>> fix this.
>  
> Thanks. I just checked out the doc Whats new in 2.0 and found it. I
> didn't think my redhat 7.1 was that old. I'll just upgrade then.

i think they just have the default to python 1.5.2 either you can type 
python2 or python21 to get the new one. maybe you need to install another 
RPM, but chances are good that both are installed parallel.

chris

-- 
Chris <cliechti at gmx.net>




More information about the Python-list mailing list