It's not a secret anymore!
The moose likes Jython/Python and the fly likes backward compatability Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Languages » Jython/Python
Bookmark "backward compatability" Watch "backward compatability" New topic

backward compatability

Jeanne Boyarsky
author & internet detective

Joined: May 26, 2003
Posts: 33130

Python 3 isn't backward compatible with Python 2. Is this a problem in practice? It sounds like it would be one, but I'm not seeing people crying about it.

[OCA 8 book] [Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Other Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, TOGAF part 1 and part 2
Palak Mathur
Ranch Hand

Joined: Jan 29, 2007
Posts: 316

Backward compatibility is certainly an issue when you are trying to migrate from 2.x to 3.0. However, the Python community is not fast paced in adapting to changes like other communities such as Ruby, etc. are. Though people may not be crying out loud but certainly there are people who are crying. Advantage of Python is numerous additional Libraries that help to scale Python like NumPy, SciPy, etc. So the issue that someone may feel is about the port of these numerous libraries for 3.x. With the release of 3.0 ver, certainly these libraries have become legacy system and if you want to migrate to this version, then certainly it can be painful as with migrating from any legacy system to newer technology.

If you are using 2.6, 2.7 version of Python, then certainly the effort will be less.

Now, choice of version whether 2.7 or 3.0 will certainly depend on kind of work you do. If you just wish to play around with Python, then certainly go for 3.0 if it works for you. Otherwise stick to 2.7. I use 3.0 for my personal work and 2.7 for scripting purpose.

Palak Mathur | My Blog | TechJaunt | What is JavaRanch? | List of All FAQs
Allen Downey

Joined: Sep 07, 2012
Posts: 25

I think Palak summed it up pretty well. The transition from Python 2.x to 3 has been going on for a while, and no end in sight.

One consolation is that most of the changes are small, so while you are learning Python, it doesn't matter which one you learn. Except for the print statement/function. That's by far the most visible change.

Programs like 2to3 can convert many Python programs from 2.x to 3 automatically. There are limitations, but for the programs I have converted, everything worked out of the box.

Still, I think Python 2.x will be with us for a long time.


All of my books are available from
Palak Mathur
Ranch Hand

Joined: Jan 29, 2007
Posts: 316

I also tried 2to3 and works fine for most of the cases
I agree. Here's the link:
subject: backward compatability
It's not a secret anymore!