[issue18629] future division breaks timedelta division by integer

Alexander Belopolsky report at bugs.python.org
Sat Aug 3 20:19:22 CEST 2013


Alexander Belopolsky added the comment:

There are two schools of thought here.  One school (MAL and Mark) thinks of durations as real number of seconds.  The other school (Tim and I) think of durations as integer number of resolution intervals.  This is why I and Tim before me resisted adding true division of timedelta by a number and multiplication of timedelta by a float.  Mark prevailed on that issue (see #1289118.)  His expertise in floating point computing certainly helped designing and implementing these operations correctly.  We still have a small quirk waiting to be ironed out (see #8860), but overall I am happy with the current state.

This said, the datetime module carries a long legacy of being a pure integer arithmetics in a funny variable-radix notation.  We can disagree on the utility of floor division as it is currently defined, but we cannot remove or change it in an incompatible way.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18629>
_______________________________________


More information about the Python-bugs-list mailing list