Message300954
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. |
|
Date |
User |
Action |
Args |
2017-08-28 14:36:40 | Oren Milman | set | recipients:
+ Oren Milman |
2017-08-28 14:36:40 | Oren Milman | set | messageid: <1503931000.21.0.764494766764.issue31293@psf.upfronthosting.co.za> |
2017-08-28 14:36:40 | Oren Milman | link | issue31293 messages |
2017-08-28 14:36:40 | Oren Milman | create | |
|