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 <rep...@bugs.python.org>
<http://bugs.python.org/issue18629>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to