This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Oren Milman
Recipients Oren Milman
Date 2017-08-28.14:36:40
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
both of the following true division and multiplication operations crash the

import datetime

class BadFloat(float):
    def as_integer_ratio(self):
        return (1 << 1000) - 1

datetime.timedelta() / BadFloat()
datetime.timedelta() * BadFloat()

this is because both multiply_float_timedelta() and truedivide_timedelta_float()
(in Modules/_datetimemodule.c) assume as_integer_ratio() returns tuple.
Date User Action Args
2017-08-28 14:36:40Oren Milmansetrecipients: + Oren Milman
2017-08-28 14:36:40Oren Milmansetmessageid: <>
2017-08-28 14:36:40Oren Milmanlinkissue31293 messages
2017-08-28 14:36:40Oren Milmancreate