[issue2706] datetime: define division timedelta/timedelta

Alexander Belopolsky report at bugs.python.org
Fri Nov 14 19:03:01 CET 2008


Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Fri, Nov 14, 2008 at 12:51 PM, STINNER Victor <report at bugs.python.org> wrote:
>
> STINNER Victor <victor.stinner at haypocalc.com> added the comment:
>
> Why not also implementing divmod()? It's useful to split a timedelta
> into, for example, (hours, minutes, seconds):

I agree and in this case mod should probably be implemented too.

With your patch:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
TypeError: unsupported operand type(s) for %: 'datetime.timedelta' and
'datetime.timedelta'

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


More information about the Python-bugs-list mailing list