New submission from Alexander Belopolsky: >>> import sys >>> sys.modules['_datetime'] = None >>> from datetime import timedelta >>> timedelta(seconds=1)*0.6112295 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "/Users/a/Work/cpython/Lib/datetime.py", line 519, in __mul__ return self * a / b File "/Users/a/Work/cpython/Lib/datetime.py", line 516, in __mul__ self._microseconds * other) File "/Users/a/Work/cpython/Lib/datetime.py", line 411, in __new__ raise OverflowError("timedelta # of days is too large: %d" % d) OverflowError: timedelta # of days is too large: 63720670102
C implementation is unaffected: >>> from datetime import timedelta >>> timedelta(seconds=1)*0.6112295 datetime.timedelta(0, 0, 611229) ---------- assignee: belopolsky components: Library (Lib) messages: 236602 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: OverflowError from timedelta * float in datetime.py type: behavior versions: Python 3.5 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue23521> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com