[issue11576] timedelta subtraction glitch on big timedelta values

SilentGhost report at bugs.python.org
Wed Mar 16 19:38:31 CET 2011


SilentGhost <ghost.adh at gmail.com> added the comment:

To emphasize that it's only days parameter that is overflowing here is another case:

>>> timedelta(999999999, 1, 1) - timedelta(999999999, 0, 0)
datetime.timedelta(0, 1, 1)
>>> timedelta(999999999, 1, 1) - timedelta(999999999, 1, 0)
Traceback (most recent call last):
  File "<pyshell#18>", line 1, in <module>
    timedelta(999999999, 1, 1) - timedelta(999999999, 1, 0)
OverflowError: days=-1000000000; must have magnitude <= 999999999

----------
nosy: +SilentGhost
versions: +Python 3.2, Python 3.3

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


More information about the Python-bugs-list mailing list