[Python-Dev] Fwd: Re: Floor division (original) (raw)

python at rcn.com python at rcn.com
Tue Jan 23 14:59:57 CET 2007


Do note that this discussion is only about Python 3. Under the view that it was a (minor, but real) design error to /try/ extending Python's integer mod definition to floats, if mod, and divmod and floordiv go away for binary floats in P3K they should certainly go away for decimal floats in P3K too. And that's about syntax, not functionality: the IBM spec's "remainder" and "remainder-near" still need to be there, it's "just" that a user would have to get at "remainder" in a more long-winded way (analogous to

[Facundo Batista]

We'll have to deprecate that functionality, with proper warnings (take not I'm not following the thread that discuss the migration path to 3k).

And we'll have to add the method "remainder" to decimal objects (right now we have only "remaindernear" in decimal objects, and both "remainder" and "remaindernear" in context).

Whoa. This needs more discussion with respect to the decimal module. I'm not ready to throw-out operator access to the methods provided by the spec. Also, I do not want the Py2.x decimal module releases to be complexified and slowed-down by Py3.0 deprecation warnings. The module is already slow and has ease-of-use issues.

Raymond



More information about the Python-Dev mailing list