A use for integer quotients

Guido van Rossum guido at python.org
Tue Jul 24 20:41:11 EDT 2001


"Daniel Fackrell" <dfackrell at DELETETHIS.linuxmail.org> writes:

> Why not add a "from __past__ import division" for those who need old
> code to work.  Then there might be a little less resistance to this
> (arguably good) change.

That's not a totally bogus idea, yet I don't like it very much.  It
would mean that the old semantics will live on *forever*.  The idea of
the __future__ statement is that eventually (say, when Python 3000 is
released :-) you *are* in the future, and then the __future__
statement becomes redundant, so it is a temporary wart in your code.

For sites that absolutely cannot afford to upgrade their code, it
should be possible to simply keep the old interpreter version around,
just like there are still scripts requiring perl4.

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list