[issue4291] Allow Division of datetime.timedelta Objects

Christian Heimes report at bugs.python.org
Mon Nov 10 01:02:55 CET 2008


Christian Heimes <lists at cheimes.de> added the comment:

That's just too weird. A long time ago I suggested to implement __int__
and __float__ on timedelta objects: int(timedelta) -> seconds,
float(timedelta) -> seconds.micros. Then your use case could be written
as float(td1) / float(td2) which is far more obvious than td1 / td2.
Unfortunately I wasn't a core developer back in those days.

----------
nosy: +christian.heimes
priority:  -> low

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


More information about the Python-bugs-list mailing list