因为您需要升级到 Python 2.6 或更高版本,从而修复了此错误。
$ python2.5 -c 'import datetime; print(datetime.datetime.min - datetime.timedelta(days=2))'
0001-00-255 00:00:00
$ python2.6 -c 'import datetime; print(datetime.datetime.min - datetime.timedelta(days=2))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OverflowError: date value out of range
$ python2.7 -c 'import datetime; print(datetime.datetime.min - datetime.timedelta(days=2))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OverflowError: date value out of range
$ python3.3 -c 'import datetime; print(datetime.datetime.min - datetime.timedelta(days=2))'
Traceback (most recent call last):
File "<string>", line 1, in <module>
OverflowError: date value out of range
您是否需要有人跟踪错误编号、补丁和 python-dev 讨论,或者这些信息对您来说是否足够?