Message194207
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 |
|
Date |
User |
Action |
Args |
2013-08-02 21:27:58 | madison.may | set | recipients:
+ madison.may, exarkun, pitrou |
2013-08-02 21:27:58 | madison.may | set | messageid: <1375478878.14.0.279166874419.issue18629@psf.upfronthosting.co.za> |
2013-08-02 21:27:58 | madison.may | link | issue18629 messages |
2013-08-02 21:27:57 | madison.may | create | |
|