On Nov 17, 2011 8:28 PM, "Mark Lybrand" <mlybr...@gmail.com> wrote:
>
> Okay, so I am about to take up the banner of learning Python again. I had
started with 3.2 and I have a book that I like.  But all of the things that
I want to use Python for appear to be 2.x specific.  Will I be setting
myself up for failure if I continue learning 3 and then try to write
programs in 2.x?  Note that I am an experienced programmer, albeit in
curly-brace languages (Perl, Java, C#, HTML/CSS/JavaScript), so that will
probably count in my favor.  But y'all would know better than I if there
are significant issues that I will need to overcome conceptually.

The main differences are syntactic. If you add these lines to the top of
your 2.7 files then you won't have much else to worry about.

from __future__ import print_function, unicode_literals, division,
absolute_import
range, input = xrange, raw_input

There may be some other differences but those should take care of the
larger ones.

HTH,
Wayne
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to