Question about Python

Rocco Moretti roccomoretti at
Fri Jul 1 16:26:58 CEST 2005

Jan Danielsson wrote:

>    However, when I look at the various Python modules/libraries, I see
> that there are several versions of them, for different versions of
> python. I've seen everything from "for python 1.5" up to "for python
> 2.4" with all versions in between. This scares me a little bit. I assume
> that the reason for the different versions is because of new language
> features?

Please be aware that although Python tries to be compatible at the 
source level, compatibility at the binary level is only guaranteed at 
the minor revision level (the third number in the dotted triple version 

So when most libraries have "for Python 1.5" and "for Python 2.4" 
downloads, those are usually for precompiled binaries *only*. If you 
download and compile the source itself, the same files can run on all 
versions of Python listed. For good or bad, Python expects you to have 
access to the source code

Note however, that programs taking advantage of features introduced in a 
more recent version of Python won't run on older versions (obviously), 
even at the source level. They will, however, usually run on any newer 
version, unless the author took advantage of a bug, or did something 
perverse, like reassigning None. So when a Python program says "Python 
2.1 required", that usually means "Python 2.1 or later required".

At any rate, all older versions of Python are still availible, and 
probably will be for the forseable future, and multiple (major) versions 
of Python can coexist happily with each other on the same machine, so if 
you need to use an older version, you can.

More information about the Python-list mailing list