Python 2.x and 3.x usage survey

Steve Hayes hayesstw at telkomsa.net
Wed Jan 1 07:38:59 EST 2014


On Wed, 01 Jan 2014 22:37:45 +1100, Steven D'Aprano
<steve+comp.lang.python at pearwood.info> wrote:

>Steve Hayes wrote:
>
>> I borrowed a book called "Learning Python" by Lutz and Asher, which is
>> geared for 2.2/2.3.
>> 
>> But the version I have in Windows is 3.2, and it seems that even "Hello
>> World" presents and insurmountable problem.
>
>It certainly is not *insurmountable*. Not unless you consider typing
>brackets ( ) to be an inhumanly difficult task, in which case you might as
>well give up on being a programmer and take up something easier like brain
>surgery.
>
># Python 2 version
>print "Hello World!"
>
># Python 3 version
>print("Hello World!")

I was thinking or of this:

>>> python g:\work\module1.py
  File "<stdin>", line 1
    python g:\work\module1.py
           ^

Which gave a different error the previous time I did it. 

But, hey, it worked from the DOS prompt

C:\Python32>python g:\work\module1.py
Hello Module World

But hey, don't mind me.

The biggest problem I have is that when something doesn't work, I don't know
if I have done something stupid, or if it's just an incompatibility of the
different versions. 



-- 
Steve Hayes from Tshwane, South Africa
Web:  http://www.khanya.org.za/stevesig.htm
Blog: http://khanya.wordpress.com
E-mail - see web page, or parse: shayes at dunelm full stop org full stop uk



More information about the Python-list mailing list