New submission from Raymond Hettinger <raymond.hettin...@gmail.com>:
The API for PyFloat_AsDouble() returns -1.0 to indicate an error. PyErr_Occurred() should only be called if there is a -1.0 return code. This is the normal practice for those calls and it is a bit faster because it avoids unnecessary external call. ---------- components: Argument Clinic messages: 350395 nosy: larry, rhettinger priority: normal severity: normal status: open title: Generate correct error check for PyFloat_AsDouble type: behavior versions: Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue37942> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com