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 <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za>
In-reply-to
Content
both of the following true division and multiplication operations crash the
interpreter:

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.
History
Date User Action Args
2017-08-28 14:36:40Oren Milmansetrecipients: + Oren Milman
2017-08-28 14:36:40Oren Milmansetmessageid: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za>
2017-08-28 14:36:40Oren Milmanlinkissue31293 messages
2017-08-28 14:36:40Oren Milmancreate