Version incomptabilities, code changes, __future__, etc

Delaney, Timothy tdelaney at avaya.com
Wed Jul 11 22:02:23 EDT 2001


There are a (relatively) large number of enhancements to the Python language
coming up which *will* break code compatibility.

I would like to provoke some discussion on a suggestion.

A new major version, Python 3.000 ;) is introduced.

Python 3.x will contain mandatory semantic and syntax changes.

Python 2.x will always maintain 100% syntax and semantic compatibility with
Python 2.1.

The mandatory version for all __future__ statements will be set to 3.0. This
includes nested scopes.

__future__ statements will be available in 2.x for all incompatible changes
in 3.0.

This has the following advantages:

1. 2.x is guaranteed backwards compatible for things such as int/int
division.
2. Code can be made to work with both 2.x and 3.0 with appropriate
__future__ statements.
3. The code base for 2.x and 3.0 can be identical, except for the sole
difference of the version number.

This obviously needs to be fleshed out, and possibly turned into a PEP, but
I think this would offset many of the worries people have about the changes
that are being made.

Tim Delaney
Avaya Australia
+61 2 9352 9079




More information about the Python-list mailing list