[Tutor] Should a beginner learn Python 3.x

wesley chun wescpy at gmail.com
Sun Nov 15 08:37:26 CET 2009


>> My brother in law is learning python.  He's downloaded 3.1 for
>> Windows, and is having a play.  It's already confused him that print
>> "hello world" gives a syntax error....
>>
>> He's an absolute beginner with no programming experience at all.  I
>> think he might be following 'Python Programming for the Absolute
>> Beginner", or perhaps some online guides.  Should I advise him to
>> stick with 2.6 for a bit, since most of the material out  there will
>> be for 2.x?  Or since he's learning from scratch, should he jump
>> straight to 3.x


good question, and already well-answered by most. i'll chime in with a
few remarks too. basically, if he is really starting from scratch,
i.e., no preexisting codebase, not using it for work, etc., then
there's no harm in starting using 3.x as long as you give the caveat
that most tutorials and source out there is still 2.x. 3.x has not
gained widespread adoption yet because not all of the lower-level (nor
higher-level) libraries, packages, and modules have been ported to 3.x
yet.

i gave a talk recently about this very topic (
http://siliconvalley-codecamp.com/Sessions.aspx?OnlyOne=true&id=227 )
and will repeat it again at PyCon 2010 in Atlanta (
http://us.pycon.org/2010/conference/talks -- see session #48 ).

i get asked this question a lot, esp. when it pertains to my book,
"Core Python Programming." which should i learn? is your book
obsolete? etc. i basically tell them that even though they are
backwards-incompatible, it's not like Python 2 and 3 are sooooo
different that you wouldn't recognize the language anymore! as Kris
has said, there are just a handful of noticeable difference that you
have to just keep in mind. finally, the next edition of the book will
definitely be BOTH Python 2 and 3. Python 2 isn't EOL'd and will be
around for awhile longer -- the most important evidence of this being
that both 2.x and 3.x are being developed in parallel.

hope this helps!
-- wesley
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
"Core Python Programming", Prentice Hall, (c)2007,2001
"Python Fundamentals", Prentice Hall, (c)2009
    http://corepython.com

wesley.j.chun :: wescpy-at-gmail.com
python training and technical consulting
cyberweb.consulting : silicon valley, ca
http://cyberwebconsulting.com


More information about the Tutor mailing list