Backwards Compatibility of Python versions

Paul Rubin phr-n2002a at
Sat Feb 2 21:55:00 EST 2002

Kragen Sitaker <kragen at> writes:
> What do you mean by "stable"?  What's "unstable" about having to put
> 'from __future__ import division' at the top of your module to get
> reasonable division behavior for the next two, three, five, or ten
> years?

I just tried that and it throws an error:

    $ python
    Python 1.5.2 (#1, Mar  3 2001, 01:35:43)  [GCC 2.96 20000731 (Red Hat Linux 7.1 2 on linux-i386
    Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
    >>> from __future__ import division
    Traceback (innermost last):
      File "<stdin>", line 1, in ?
    ImportError: No module named __future__

That's with the version of Python currently being shipped with Red Hat
Linux, so any scripts I distribute with that future import will crash
for a lot of people.

More information about the Python-list mailing list