A use for integer quotients

Bengt Richter bokr at accessone.com
Mon Jul 23 14:51:48 EDT 2001

On Mon, 23 Jul 2001 11:46:45 GMT, Guido van Rossum <guido at python.org> wrote:
>Of course, I'm well aware of the issues around maintaining old code.
>We will have to carry around "from __future__ import division" for a
>loooooong time.  Python 2.2 is the first opportunity to introduce it,
>so let's not be shy.
What about mandatory version/requirement marking of code depending
on new features of 2.2 and beyond?

This would introduce *now* the possibility of using 2.1 rules for unmarked
code, and allowing progress without backwards-compatibility pain[1].

Perhaps a requires statement keyword with syntax like print? E.g.,

    requires {'Python':'2.3', 'math':'2.4','division':('unified','warn') }

or short form could be distinguished by arg type

    requires 2.3

The keyword itself would be rejected by older interpreters, signaling a need
to upgrade the interpreter (or revise the script code down).

All the good arguments on both sides of the '/' question are making me
feel wishy-washy, as I sympathize in alternation, but I do find the
backwards compatibility argument compelling. HTH.

[1] Other than for implementors ;-)

More information about the Python-list mailing list