[issue2706] datetime: define division timedelta/timedelta

Amaury Forgeot d'Arc report at bugs.python.org
Wed Mar 25 09:45:11 CET 2009


Amaury Forgeot d'Arc <amauryfa at gmail.com> added the comment:

Well, this already happen with other types:

>>> a   = 100
>>> a //= 2.0
>>> a
50.0

>>> d  = datetime.datetime.now()
>>> d -= datetime.datetime.now()
>>> d
datetime.timedelta(-1, 86391, 609000)

See http://docs.python.org/reference/datamodel.html#object.__iadd__
"... return the result (which could be, but does not have to be, self) ..."

----------

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


More information about the Python-bugs-list mailing list