from __past__ import integerDivision (was Re: A modest PEP0238 suggestion)

Chris Gonnerman chris.gonnerman at newcenturycomputers.net
Thu Jul 26 14:26:29 CEST 2001


----- Original Message -----
From: "Bruce Sass" <bsass at freenet.edmonton.ab.ca>

> > My proposal for
> >
> >     from __numerics__ import original
> >
> > is the same sort of thing.  When the "original" semantics disappear, the
> > user gets an obvious error message.
>
> __future__ and __past__ both imply reference to some specific time,
> and it is reasonable to expect what they are being used for will go
> away when that time becomes inconsequential to the present (i.e., the
> future has already come, or the past is distant).
>
> __<something specific>__ has no such transitory implications, and
> would best be left for permanent features.  Perhaps for sets of
> incompatible features that must all be in the language.

True.  However, my proposal covers both the "original" Python division
semantics and the addition of optional rational, fixedpoint, decimal,
and any other sort of numeric system the twisted mind of Man can come
up with.  The key word is *optional* as I don't want rationals, probably
ever, but I would love decimal floats and fixedpoints as builtins; the
rational camp would love rationals (naturally) but probably most couldn't
care less about decimal floats or fixedpoints.

The "original" semantics under my proposal would be "invented" as already
deprecated, and would be removed in 3.0 as the current plan stands.  We
have deprecated and subsequently removed things before without the
__future__ directives and it didn't kill us; hence I see the question of
"transitory implications" as only of minor concern.  Remember, explicit
(even in documentation) is better than implicit.






More information about the Python-list mailing list