[issue8644] timedelta.total_seconds needlessly inaccurate, especially for negative timedeltas

Mark Dickinson report at bugs.python.org
Fri May 7 14:30:04 CEST 2010


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

P.S.  This change would also make total_seconds() consistent with division by timedelta(seconds=1):

>>> td / timedelta(seconds=1)
-0.000123

In fact, this might even be a good way to re-implement total_seconds internally.

----------

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


More information about the Python-bugs-list mailing list