Developers prepare for Python breakage

Daily Newsletters

Sign up to ZDNet UK's daily newsletter.

NEWS

The launch of version 3.0 of Python, expected within the next year, will see major changes to some fundamental elements of the programming language, release manager Anthony Baxter explained in a keynote speech at linux.conf.au in Melbourne.

Python is used extensively by Google for many of its products, including the popular YouTube video-sharing site.

"3.0 is also known as the release where we break all your code but we're doing it for a good reason," Baxter said. "Python is 16 years old. Like all 16-year-olds, it's got some really annoying features."

"Pretty much every program will need changes," Baxter said, but he stressed that the shift would be some time in coming. "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."

Both the 2.6 and 3.0 releases are due to appear in late 2008 or early 2009. "I really do think it'll be early next year before it's out. I think there's so much work to bed it down," Baxter said.

When they do come, those alterations will present a big challenge to a company such as Google, where Baxter has his day job. Around 15 percent of the search giant's total code base is written in Python. "We get a lot of coders. Obviously I can't say how many, but it's a lot," Baxter noted.

The increasingly complexity of the language has made it difficult for Google's developer teams to work with multiple languages. "[Python] is used for a lot of the core glue. People are having to bounce between Java and Python. They need to context switch. In that case, a lighter-weight language is a huge bonus. For these guys, simpler is much, much better."

Read this

Feature
Help/HowTo: Seven habits of effective developers

Sun engineer Lee Chuk Munn says writing applications is like writing a book — keep it clean and keep it simple...

Read more +

One of the most notable changes is turning the "print" statement, used for all kinds of information output, into a function. "Currently print has awful syntax for doing all sorts of things," Baxter said.

"The other one that's going to break a lot of code really subtly is that Unicode is now the default. There's a real shambles in Python at the moment when it comes to mixing Unicode and non-Unicode strings."

Other alterations, such as altering models used for division and switching the symbols for "not equal" from "<>" to "!=", have long been discussed in the Python community but have been held back because of fears over backward compatibility. With the shift to 3.0, the view is "what the hell, we're breaking the code anyway, let's fix it", Baxter 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."

To minimise problems with changes, Python 2.6 is also being altered to warn developers of constructs that might prove problematic when they move to 3.0. "In 2.6 we've added a bunch of warnings, and there's going to be more of these going through," Baxter said.

Post your comment

In order to post a comment you need to be registered and logged in.

You can also log in with Facebook. Log in or create your ZDNet UK account below

  • Login

Will not be displayed with your comment

By signing up for this service, you indicate that you agree to our Terms and Conditions and have read and understood our Privacy Policy. Questions about membership? Find the answers in the Community FAQ

Get ZDNet UK's daily newsletter

Enter your email address to sign up

ZDNet UK Live

Simon Bisson and Mary Branscombe

Nice to see that Turing's idea of a general purpose computer doing once-hardware-powered tasks in software is now universal ;-) Mary

6 minutes ago by Simon Bisson and Mary Branscombe on Software with everything
Jason Burchell

seriously now. I've only bothered to read a small bit of the comments. do me and the rest of the world a favour. stop saying it does not work or...

4 hours ago by Jason Burchell via Facebook on Music industry negotiating over 24-bit downloads
Philip Charles Cohen

Read about it and weep, John Donahoe ... In addition to Visa’s V.me, there is now MasterCard’s PayPass digital wallet soon to arrive; another...

8 hours ago by Philip Charles Cohen via Facebook on PayPal takes phone-based payments to the high street
apexwm

Leslie Satenstein : Where have you ever seen Mozilla even mention this? Firefox is the most popular browser in the GNU/Linux OS, so I don't see...

9 hours ago by apexwm on Firefox rapid release improves Fedora Linux
songmaster

SHleG: Do you remember building a clockwork scorpion kit (I'm pretty sure I have a photo of it somewhere) — I think it was called something like...

11 hours ago by songmaster on Software with everything
Chris Wortman

Good I love Yahoo! Their search engine is getting better than Google as of late. I find more of what I want on the first page, and usually within...

11 hours ago by Chris Wortman via Facebook on Linux Mint 13 ramps up for KDE release
PatrickG

openhgs has made the point for Windows 8 multiple monitors without realising it! With Windows 7 you have to switch the mouse and so your focus...

13 hours ago by PatrickG on Windows 8 could speed multi-monitor uptake
Leslie Satenstein

Mozilla has threatened to stop supporting Linux. I guess that UBUNTU is going with another browser. I indicated that if Mozilla stops supporting...

14 hours ago by Leslie Satenstein via Facebook on Firefox rapid release improves Fedora Linux
Andy Bolstridge

Much as I abhor Microsoft's licensing practices, this is almost certainly down to purchasing IT equipment via 3rd party consultants - you get the...

15 hours ago by Andy Bolstridge via Facebook on 6 million wasted licences and £1,200 PCs: welcome to government IT
Jack Schofield

@openhgs Windows users have had multiple desktops since Linus started writing Linux. They just haven't shipped as standard because not enough...

1 day ago by Jack Schofield on Windows 8 could speed multi-monitor uptake
Jack Schofield

@Phil at Cloud4 What, Microsoft gets £1,200 per PC and £1,622 per server? Gosh, I'm amazed....

1 day ago by Jack Schofield on 6 million wasted licences and £1,200 PCs: welcome to government IT
craigsc

You guys have no idea what is going on at Autonomy. Autonomy could have been a much more profitable organization. The sales operations at Autonomy...

1 day ago by craigsc on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Moley

How does this impact on dual or multi booting? Seems to me to more or less prohibit this, from Windows 8 anyway. Will Grub 2 recognise Windows 8,...

1 day ago by Moley on Windows 8 start-up speed forces USB boot workaround
apexwm

I don't understand why there cannot be a slight pause during the boot process so the user can press a key. Many operating systems do this, even if...

1 day ago by apexwm on Windows 8 start-up speed forces USB boot workaround
Gavin Goodman

You can now buy the Xi3 modular computer in the UK at http://www.ocdistribution.com . This can be bought with the Tand3m software, pricing and...

1 day ago by Gavin Goodman on CES 2012: Xi3 microSERV3R
Phil at Cloud4

I agree: Mike Lynch can clearly build a business and manage strategy. I suspect the exit of Mike is more likely the end of a planned handover...

2 days ago by Phil at Cloud4 on HP cuts 27,000 staff as Autonomy chief Lynch leaves
Phil at Cloud4

This is unbeleivable government wastage with only one winner... Microsoft 1 - Tax payer Nil!

2 days ago by Phil at Cloud4 on 6 million wasted licences and £1,200 PCs: welcome to government IT
Mispam

So what do you do when you can't boot into windows? Why can't I just hold Shift while I power up instead of having to boot into windows and click a...

2 days ago by Mispam on Windows 8 start-up speed forces USB boot workaround
apexwm

I've also seen that Mac OS X for Intel machines is supposed to run in VirtualBox, which would also be a nice solution. I've never tried it though.

2 days ago by apexwm on xTreme Triple Booting: Linux, Mac & Windows
dave heasman

What I wonder is why when companies are caught bang to rights in not providing contracted services, people bend over to smear the customers? Surely...

2 days ago by dave heasman on Virgin throttles broadband for high-speed customers