[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*
Mark Dickinson
report at bugs.python.org
Fri May 4 21:39:34 CEST 2012
Mark Dickinson <dickinsm at gmail.com> added the comment:
> But values that rounded to DBL_MAX can raise
> OverflowError. In any case it's too difficult to achieve strict behavior
> in this corner case.
Well, PyLong_AsDouble *does* achieve strict behaviour in this corner case :-). Integers less than 0.5 * (sys.float_info.max + 2**1024) in absolute value give finite results; integers greater than or equal to that bound produce an OverflowError.
> Take a look at the tests and may be you'll see the system.
I don't see how looking at the tests helps with making a decision about breaking backwards compatibility or not. :-)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14722>
_______________________________________
More information about the Python-bugs-list
mailing list