[issue14722] Overflow in parsing 'float' parameters in PyArg_ParseTuple*

Mark Dickinson report at bugs.python.org
Fri May 4 20:12:08 CEST 2012


Mark Dickinson <dickinsm at gmail.com> added the comment:

> And it checks strictly out of ±DBL_MAX.

Nope.  Values just larger than DBL_MAX won't raise OverflowError here.

> Because float(10**1000) returns no float('inf'), but raises an
> exception, I think that returning ±∞ will be wrong.

Possibly.  But there's also the fact that 3.2 already returns inf here;  we'd need a pretty good reason to break that.  Like I said, I'm not sure which the right way to go here is.

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14722>
_______________________________________


More information about the Python-bugs-list mailing list