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

Serhiy Storchaka report at bugs.python.org
Sat May 5 19:41:08 CEST 2012


Serhiy Storchaka <storchaka at gmail.com> added the comment:

No one integer produces infinity in 'double' parameter parsing.

But the 'float' parameter parsing can produce infinity, and it can raise
an exception. To be consistent, we need or produce infinity on double
overflow (in this case, we must explicitly produce infinity on float
overflow), or to raise an exception on float overflow.

There is also a third option -- deprecate the 'float' parameter parsing.
Leave the responsibility for the proper overflow handling on the user.

----------

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


More information about the Python-bugs-list mailing list