Europython keynote: Guido van Rossum - python 3000ΒΆ

Tags: europython, europython2006, plone

One clarification by Guido up front: lambda is not going away!

Guido expects a lot of tension between him and the rest of the developers on python 3000. There are a lot of things people want to change or add. Everyone has his own pet pieve that he wants to add or change and python 3000 brings that out.

Python 3000 is the only release in which there will be incompatibilities and breakage. They won't invite breakage, but it will be allowed. Some things can't be fixed without incompatibilities and this is the time to change those. Fix early design bugs. Old style classes will be removed. Old style integer division. Stuff that has been deprecated for quite some time.

python 3000 == python 3.0 == py3k

Guido van Rossum

There has to be some amount of process, otherwise we're lost. There are too many proposals competing for time: this won't be perl 6. When do we want py3k to be ready? How long are we going to maintain 2.x and 3.x? How do we migrate? Do we backport py3k features? We can't freeze 2.x and let it die without support.

First alpha: not before 2007. Final release probably a year after that. Probably there'll be a quick 3.1 and 3.2 afterwards. 2.x and 3.x will be developed in parallel. 2.6 will come, probably before 3.0. 2.7 is likely, may contain some backports from py3k.

How incompatible can it be? New keywords are allowed. .keys() and so isn't going to return lists anymore but iterators instead. All strings will by unicode and there'll be a mutable "bytes" data type if you need 8-bit byte/string like stuff. Binary file IO will be changed (has to do with bytes and unicode).

Some examples of things that won't happen is that it'll stay dict.keys() instead of only dict.keys. Also the operator priority won't change.

A completely mechanical migration of existing code won't be doable. Some things just cannot be recognised. The most likely approach will be to use a pychecker-like tool to detect some 80% of the changes and to create a version of 2.x that warns about doomed code.

Some things that won't be in py3k. No programmable syntax/macros. No syntax for parallel iteration (use zip). Iterating over a dictionary gives you keys instead of key/value pairs, that will stay that way.

PEP 3100 has a large list of items that are considered to be included in py3k.

There will be an new standard IO stack. C stdio has too many problems. You don't know how many bytes you have buffered, for instance. The new bytes/str implementation gives an opportunity to fix all this.

Print becomes a function instead of a statement. Print-as-statement is a barrier to evolution of your program and of the language (see link in PEP3100).

 
vanrees.org logo

About me

My name is Reinout van Rees and I work a lot with Python (programming language) and Django (website framework). I live in The Netherlands and I'm happily married to Annie van Rees-Kooiman.

Weblog feeds

Most of my website content is in my weblog. You can keep up to date by subscribing to the automatic feeds (for instance with Google reader):