Message294802
The C "_datetime" implementation seems to handle this as documented. But either way, the "timedelta" range is greater than the "datetime" range, so it seems to be just a difference in OverflowError messages, not a big practical problem:
Python "datetime" implementation:
>>> import sys
>>> sys.modules["_datetime"] = None
>>> from datetime import *
>>> datetime.max - timedelta.max
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\Martin\AppData\Local\Programs\Python\Python35-32\lib\datetime.py", line 1741, in __sub__
return self + -other
File "C:\Users\Martin\AppData\Local\Programs\Python\Python35-32\lib\datetime.py", line 518, in __neg__
-self._microseconds)
File "C:\Users\Martin\AppData\Local\Programs\Python\Python35-32\lib\datetime.py", line 430, in __new__
raise OverflowError("timedelta # of days is too large: %d" % d)
OverflowError: timedelta # of days is too large: -1000000000
C "_datetime" implementation:
>>> from datetime import *
>>> datetime.max - timedelta.max
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
OverflowError: date value out of range |
|
Date |
User |
Action |
Args |
2017-05-31 00:08:48 | martin.panter | set | recipients:
+ martin.panter, René Hernández Remedios |
2017-05-31 00:08:47 | martin.panter | set | messageid: <1496189327.39.0.997090910355.issue30516@psf.upfronthosting.co.za> |
2017-05-31 00:08:47 | martin.panter | link | issue30516 messages |
2017-05-31 00:08:46 | martin.panter | create | |
|