Python 3.0 set to break all your code

During the Linux conference linux.conf.au held last week in Melbourbe, Australia, Anthony Baxter, the Python programming language release manager and employee of Google, warned the next language update is going to break everyone’s existing code.

The latest build of Python is currently 2.5.1, but version 3.0 is expected later this year or early next and includes some fundamental changes. Because Python is used extensively across a range of applications, the impact of v3.0 is going to be significant. As an example, Google uses Python for about 15% of its entire code base, with YouTube also using it extensively.

Talking at the conference, Baxter said:

3.0 is also known as the release where we break all your code but we’re doing it for a good reason … Python is 16 years old. Like all 16-year-olds, it’s got some really annoying features. 2.x is also not going away. There is going to be a 2.6, it’ll be out at about the same time as 3.0. We’re not expecting everyone to turn around and rewrite their massive code bases the day after 3.0 comes out — that would be very foolish. We’ll keep maintaining [the 2.x series] as long as there is interest and need.

The alterations that will cause the problems for developers include:

Changes to the “print” statement to make the syntax better

Turning on Unicode as default

Changing symbols such as “not equal” from “<>” to the more standard “!=”

Baxter says there has always been a big worry over backwards compatibility, and that is why these changes have not been implemented sooner; he said:

It’s a good thing, backward compatibility, but you have a cost. There’s always a cost when you make a decision to keep around the old rubbish. It hurts.

From my own experiences. the use of scripting languages such as Python, Lua. and Ruby can drastically increase production across your development teams. No longer do you need 10 full-time programmers; you can have three and a number of scripters instead. This not only saves money, but also once the systems are in place for scripting, rapid development becomes a reality.

I’m sure the news of Python changing is going to cause some anger and annoyance for developers maintaining older code. It looks like the changes the company is implementing are for the better, however, and I would be surprised if many Python programmers haven’t already started planning for the switch and have new code ready to go.

In the same way, I hope Microsoft can take a leaf out of Baxter’s book when it considers cutting off support for Windows XP. Specifically, this part of his speech, “We’ll keep maintaining [the 2.x series] as long as there is interest and need.”

Speak Your Mind

dragonegg

It’s good to see they will continue to support the old Python while the new one is released. This will give developers time to adjust and test new code. I agree Matthew, Microsoft should not cut off support for XP so soon and should do something similar.