[issue18629] future division breaks timedelta division by integer
Madison May
report at bugs.python.org
Fri Aug 2 23:27:58 CEST 2013
Madison May added the comment:
I agree -- it's not at all intuitive that the floor division returns a decimal number of seconds, while float division raises an error. This should probably be cleaned up.
In python 3.4, both float division and integer division return decimal numbers of seconds -- that's not all that intuitive, either.
Python 3.4.0a0 (default:d5536c06a082+, Jul 11 2013, 20:23:54)
[GCC 4.8.1] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from datetime import timedelta
>>> print(timedelta(seconds=3)/2)
0:00:01.500000
>>> print(timedelta(seconds=3)//2)
0:00:01.500000
----------
nosy: +madison.may
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18629>
_______________________________________
More information about the Python-bugs-list
mailing list