[issue2706] datetime: define division timedelta/timedelta

Mark Dickinson report at bugs.python.org
Mon Apr 19 22:53:50 CEST 2010


Mark Dickinson <dickinsm at gmail.com> added the comment:

Hmm.  Having timedelta // int work is *really* peculiar, since it can only be made sense of with reference to some implicit particular chosen unit of time;  in this case, that unit of time is apparently microseconds, as far as I can tell.

Surely there aren't any applications for timedelta // int?!  The operation just doesn't make dimensional sense, since it involves taking floor of a timedelta.

I vote -3.2 minutes on extending this craziness by adding timedelta % int or divmod(timedelta, int).

----------

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


More information about the Python-bugs-list mailing list