Re: [Tutor] The Perennial 3.2 vs 2.7

2011-11-19 Thread Terry Carroll

On Thu, 17 Nov 2011, Wayne Werner wrote:


On Thu, Nov 17, 2011 at 8:45 PM, Mark Lybrand mlybr...@gmail.com wrote:

  so, use my 2.7 and not my 3.2 for my study? Or use my 3.2 for
  study and then do what I have to in 2.7 after including those
  lines?

Honestly it probably doesn't matter. Many 3rd party libraries have now 
been ported to Python 3.x, so unless you have a particular library 
you're interested in, I would start with 3.2 until you find something 
you can't do.


Personally, that's the biggy for me, and why I remain on 2.7.  wxPython 
has not yet been ported to Python 3, and that's a substantial big deal for 
me.


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


[Tutor] The Perennial 3.2 vs 2.7

2011-11-17 Thread Mark Lybrand
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.

-- 
Mark :)
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] The Perennial 3.2 vs 2.7

2011-11-17 Thread Wayne Werner
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


Re: [Tutor] The Perennial 3.2 vs 2.7

2011-11-17 Thread Wayne Werner
Forwarding on to the list... (hit reply to all next time)

On Thu, Nov 17, 2011 at 8:45 PM, Mark Lybrand mlybr...@gmail.com wrote:

 so, use my 2.7 and not my 3.2 for my study? Or use my 3.2 for study and
 then do what I have to in 2.7 after including those lines?

 Thanks for the quick reply by the way. I am still struggling with the loss
 od curly braces :)

Honestly it probably doesn't matter. Many 3rd party libraries have now been
ported to Python 3.x, so unless you have a particular library you're
interested in, I would start with 3.2 until you find something you can't do.

As far as the curly braces go... just think about everything that isn't
really programming, but telling the compiler something. Get rid of it, and
you probably have Python... and you can always try:

from __future__ import braces

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