Discussion:
Python 2.4 v/s Python3.2
Vikas Choudhary
2012-08-09 08:52:08 UTC
Permalink
Hi,

Can someone let me know advantage of python 3.2 over python 2.4

Why we should go to 3.2 version and why we should not stick to 2.4

What are the modules and new features those are not available in python 2.4 added to python3.2

--Vikas

________________________________
This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
Chris Jerdonek
2012-08-09 09:12:40 UTC
Permalink
On Thu, Aug 9, 2012 at 1:52 AM, Vikas Choudhary
Post by Vikas Choudhary
What are the modules and new features those are not available in python 2.4
added to python3.2
Here is a pretty comprehensive list:

http://docs.python.org/dev/whatsnew/index.html

One advantage to moving to 3.2 is that you'll be getting bug fixes.
Python 2.6 and earlier no longer receive bug fixes.

--Chris
Lennart Regebro
2012-08-09 09:25:25 UTC
Permalink
On Thu, Aug 9, 2012 at 10:52 AM, Vikas Choudhary
Post by Vikas Choudhary
Can someone let me know advantage of python 3.2 over python 2.4
There are loads and loads of advantages, but many are quite small. I'd
say the big ones are:

* Bugfixes. 2.4 is really old.
* The "with" statement
* Ordered Dictionaries
* argparse module
* 0b integer syntax.
* multiprocessing module
* Class decorators
* Conditional expressions
* Sending values to generators
* Dictionary views.
* print is a function
* strings are unicode
* Things are just a little bit more consistent.

Of course, all of these except the last three and a half ones are true
for Python 2.7 as well. And if you want to migrate code to Python 3,
then you should first migrate to 2.7 anyway.

//Lennart
Lennart Regebro
2012-08-09 14:36:52 UTC
Permalink
On Thu, Aug 9, 2012 at 4:29 PM, Vikas Choudhary
Are there any modules, those are specific to python 2.x and still not supported by python3.x
The relevant question there is if there are any modules you are using
that aren't supported by Python 3.

All important modules and functions in the standardlib are also in
Python 3 (although some have been reorganized:
http://python3porting.com/stdlib.html )
But when it comes to third-party modules you'll have to make a list of
those you use and check up if they support Python 3 or not.

//Lennart
Vikas Choudhary
2012-08-09 14:29:41 UTC
Permalink
Are there any modules, those are specific to python 2.x and still not supported by python3.x

-----Original Message-----
From: Lennart Regebro [mailto:regebro-***@public.gmane.org]
Sent: 09 August 2012 14:55
To: Vikas Choudhary
Cc: python-porting-+ZN9ApsXKcEdnm+***@public.gmane.org
Subject: Re: [Python-porting] Python 2.4 v/s Python3.2
Post by Vikas Choudhary
Can someone let me know advantage of python 3.2 over python 2.4
There are loads and loads of advantages, but many are quite small. I'd say the big ones are:

* Bugfixes. 2.4 is really old.
* The "with" statement
* Ordered Dictionaries
* argparse module
* 0b integer syntax.
* multiprocessing module
* Class decorators
* Conditional expressions
* Sending values to generators
* Dictionary views.
* print is a function
* strings are unicode
* Things are just a little bit more consistent.

Of course, all of these except the last three and a half ones are true for Python 2.7 as well. And if you want to migrate code to Python 3, then you should first migrate to 2.7 anyway.

//Lennart


This message and any attached documents contain information from QLogic Corporation or its wholly-owned subsidiaries that may be confidential. If you are not the intended recipient, you may not read, copy, distribute, or use this information. If you have received this transmission in error, please notify the sender immediately by reply e-mail and then delete this message.
Shane Kerr
2012-08-09 15:06:18 UTC
Permalink
Vikas,

On Thursday, 2012-08-09 01:52:08 -0700,
Post by Vikas Choudhary
Why we should go to 3.2 version and why we should not stick to 2.4
As other people have said, Python 2.4 is quite old. Let me comment
rather on the issue of Python 2.7 vs. Python 3.x.

We started BIND 10 about 3.5 years ago and the wisdom at that time was
"for new projects use Python 3", so we did. It has caused us a little
pain, not so much because of difficulty with the language or missing
libraries, but rather because Python 3 was missing from a lot of
Unix distributions at that time.

Since then, Python 3 is available as a package for all major
distributions, and has started to become the default (Arch Linux
already has done this). However, if you are targeting "enterprise"
systems, then Python 2 may make more sense. These tend to stay around
for years and years, and never upgrade. Ever. (*)

Basically, I advise:

Go with the latest Python 3,
unless you have a specific need for Python 2

--
Shane

(*) Red Hat Enterprise Linux has a 13 year support cycle... code from
2007 will be supported until 2020! If you don't think that is
weird, consider that the Linux kernel 13 years ago was 2.2.11 and
that Python itself was at version 1.5...

Loading...