Message 300954 - Python tracker

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.

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.