[issue9041] raised exception is misleading

Vinay Sajip report at bugs.python.org
Mon Aug 29 20:27:00 CEST 2011


Vinay Sajip <vinay_sajip at yahoo.co.uk> added the comment:

While the patch might improve over the current situation, doesn't it potentially mask other errors which might be raised by PyFloat_AsDouble()?
Why not just

x = PyFloat_AsDouble(value);
if (PyErr_Occurred())
    return NULL;

which would not mask any exception?

----------
nosy: +vinay.sajip

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


More information about the Python-bugs-list mailing list