[issue37942] Generate correct error check for PyFloat_AsDouble

Raymond Hettinger report at bugs.python.org
Sat Aug 24 15:09:51 EDT 2019


New submission from Raymond Hettinger <raymond.hettinger at 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 <report at bugs.python.org>
<https://bugs.python.org/issue37942>
_______________________________________


More information about the Python-bugs-list mailing list