Slashdot Log In
Python 3.0 To Be Backwards Incompatible
Posted by
kdawson
on Friday February 01, @12:21PM
from the it's-broke-jim dept.
from the it's-broke-jim dept.
Stony Stevenson writes "Organizations using Python will be affected in a major way by changes in store for the language over the course of the next twelve months, Linux.conf.au attendees were told this morning. The Python development community is working towards a new, backwards-incompatible version of the language, version 3.0, which is slated for release in early 2009. Anthony Baxter, the release manager for Python and a senior software engineer at Google Australia, said "We are going to break pretty much all the code. Pretty much every program will need changes." Baxter also added another tidbit for attendees, saying that Python accounts for around 15 percent of Google's code base."
Related Stories
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading ... Please wait.

It's a race (Score:5, Insightful)
Re:It's a race (Score:5, Informative)
> Will I be able to convert my Perl 5 programs to Perl 6?
> Yes. Larry Wall and others are already working on a Perl 5 to Perl 6 translator, which will be able to translate (most) Perl 5 source code to the equivalent Perl 6 syntax.
> In addition, Perl 6 will provide a "Perl 5 compatibility mode", allowing the compiler to directly execute any code that it recognizes as being written in Perl 5.
Depending on who you talk to, this can be said to be backward compatible.
Just rename it. (Score:5, Interesting)
Re:Just rename it. (Score:5, Funny)
There are already other [wikipedia.org] languages [wikipedia.org] doing this. If you think naming closely-related languages the same thing is a kludge, what do you think of naming mostly-unrelated languages the same thing?
Re:Just rename it. (Score:5, Informative)
The vast majority of the language and standard library will remain the same. This is just about tidying up some unfortunate warts that affect a lot of people, such as unifying the different string types. It remains Python in practically every way, and renaming it is simply unnecessary.
Re:Just rename it. (Score:5, Funny)
Python's named after the troupe Monty Python, not after the snake species. I don't think renaming it is a good idea, but suitable successors would be [Life of] Brian, [Fish Called] Wanda, Flying Circus, Holy Grail or perhaps start with sub-versions like Cleese, Chapman and Palin.
Alternatively, pick another troupe or favorite comedy show: Fry and Laurie, Mr. Bean, Fawlty Towers or Red Dwarf. Or my favorite, which brings back in the snake species AND British comedy into circular pun, Blackadder.
While talking about puns, snakes and coming full circle, I suggest Ouroboros.
Another Shock Story (Score:5, Informative)
Re:Another Shock Story (Score:5, Interesting)
Yet everyone makes fun of me when I say that I am a C++ programmer.
Re:Another Shock Story (Score:5, Interesting)
Hopefully the Python team will learn from PHP's experience.
Workaround... (Score:5, Funny)
Just kidding Python fanbois :-)
Chill, it's Friday.
Re:Workaround... (Score:5, Informative)
print as function vs. keyword (Score:5, Informative)
print "This used to work"
You now have to do
print("This is how 3.0 rolls")
There will be no grandfathering, so everything needs to be refactored accordingly.
A small, but significant change.
Re:print as function vs. keyword (Score:5, Informative)
Actually, the migration tool 2to3 performs this change automatically, and the function call approach works in both 2.5 and 3.0, so the incompatibility is greatly exaggerated.
I don't see the problem (Score:5, Insightful)
We have options. (Score:5, Insightful)
It is not like your favourite Linux distro is just going to drop the 2.x series overnight, or like Python 3 will fight 2.x on your system.
Whiners (Score:5, Insightful)
Tell, me exactly what would satisfy you? How about we just take your computer away.
I'm running for president! FREE PACIFIERS to all Slashdotters.
Re:Whiners (Score:5, Funny)
It's almost like there's more than one person with an opinion on this!
meh (Score:5, Insightful)
It'll just be a case of slowly moving code from one version to the next.
This is a brave move, but you've only got to see the mess you can get into trying to force backward compatibility for too long (Vista, anyone) to know it's the right move.
Of course, this being python, I fully expect some brainbox to come up with an automated conversion routine (v2 to v3) that "WAS WRITTEN IN ONLY 15 LINES OF CODE". etc, etc.
in fact, such a utility already exists (Score:5, Informative)
And, as others have stated, there'll be the 2.6 branch, which will be backwards compatible.
Or, in other words, the story is stupid and misleading.
Python is doomed (Score:5, Funny)
Almost 2 years old? (Score:5, Informative)
- Python 3 (or Python 3000 as it was called) as a serious effort is more than a year old.
- There is already a working interpreter in its second alpha release.
- Final release is slated for August. (No infinite Perl 6 development.)
- Developers are working very hard to make the 2 to 3 transition as painless as possible.
- The Python team is committed to keeping the 2.x series going until 3.x has clearly been accepted.
You may now proceed to complain having been thus informed.For more info, check out (Score:5, Informative)
http://docs.python.org/dev/3.0/whatsnew/3.0.html [python.org]
Not news in any way (Score:5, Informative)
This has been known for donkey's years. Guido has been talking about this compatibility break since the 90s. The changes were laid out in detail in PEP 3000 [python.org], first published in 2006. They have already released two alphas. A conversion tool to automatically make some of the required changes (such as changing print statements to print() function calls) already exists [python.org].
If this is news to you (Score:5, Insightful)
Re:#1 way to prevent adoption of new language vers (Score:5, Informative)
First of all, the changes are mostly simplifications to the core language (e.g., how to catch exceptions is currently a bit of a mess if you want to catch more than one exception). So for example, range and xrange are now one, iterators become more prevalent, "old-style" classes are going away and so new-style ones will become the standard, a lot of the things that have been deprecated now are being removed, etc. It isn't really a "new language" in any sense. This is far superior to Java's "always backwards compatible" approach which has lead to a lot of cruft building up over the years.
Next, it needs to be understood that 2.6 will be backwards compatible and include a warnings mode to highlight things that won't work in Python 3.0 to ease in the transition. There should be no problem supporting both on one system.
Finally, they are providing a 2.5->3.0 translation tool that runs in 2.5 and does most of the mechanical translation between the two for you.