[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-25 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How large is benefit from special casing exact floats? -- nosy: +serhiy.storchaka ___ Python tracker ___ __

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset 21161d73d979012ec3b7247261178b3aa1555486 by Raymond Hettinger in branch '3.8': [3.8] bpo-37942: Improve argument clinic float converter (GH-15470) (GH-15480) https://github.com/python/cpython/commit/21161d73d979012ec3b7247261178b3aa1555486

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___ ___

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- pull_requests: +15166 pull_request: https://github.com/python/cpython/pull/15480 ___ Python tracker ___ ___

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: New changeset aef9ad82f7f667cd001a7112d3bc636e918626f7 by Raymond Hettinger in branch 'master': bpo-37942: Improve argument clinic float converter (GH-15470) https://github.com/python/cpython/commit/aef9ad82f7f667cd001a7112d3bc636e918626f7 -- __

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
Raymond Hettinger added the comment: Note, the argument clinic is already generating code like this for return values in "class double_return_converter". For example, _return_value = _statistics__normal_dist_inv_cdf_impl(module, p, mu, sigma); if ((_return_value == -1.0) && PyErr_Occ

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
Change by Raymond Hettinger : -- keywords: +patch pull_requests: +15161 stage: -> patch review pull_request: https://github.com/python/cpython/pull/15470 ___ Python tracker __

[issue37942] Generate correct error check for PyFloat_AsDouble

2019-08-24 Thread Raymond Hettinger
New submission from Raymond Hettinger : 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. -