Movatterモバイル変換


[0]ホーム

URL:


homepage

Issue37942

This issue trackerhas been migrated toGitHub, and is currentlyread-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title:Generate correct error check for PyFloat_AsDouble
Type:behaviorStage:resolved
Components:Argument ClinicVersions:Python 3.9, Python 3.8
process
Status:closedResolution:fixed
Dependencies:Superseder:
Assigned To:Nosy List: larry, rhettinger, serhiy.storchaka
Priority:normalKeywords:patch

Created on2019-08-24 19:09 byrhettinger, last changed2022-04-11 14:59 byadmin. This issue is nowclosed.

Pull Requests
URLStatusLinkedEdit
PR 15470mergedrhettinger,2019-08-24 19:13
PR 15480mergedrhettinger,2019-08-25 02:25
Messages (5)
msg350395 -(view)Author: Raymond Hettinger (rhettinger)*(Python committer)Date: 2019-08-24 19:09
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.
msg350397 -(view)Author: Raymond Hettinger (rhettinger)*(Python committer)Date: 2019-08-24 19:18
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_Occurred()) {goto exit;    }
msg350419 -(view)Author: Raymond Hettinger (rhettinger)*(Python committer)Date: 2019-08-25 02:10
New changesetaef9ad82f7f667cd001a7112d3bc636e918626f7 by Raymond Hettinger in branch 'master':bpo-37942: Improve argument clinic float converter (GH-15470)https://github.com/python/cpython/commit/aef9ad82f7f667cd001a7112d3bc636e918626f7
msg350422 -(view)Author: Raymond Hettinger (rhettinger)*(Python committer)Date: 2019-08-25 02:45
New changeset21161d73d979012ec3b7247261178b3aa1555486 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
msg350443 -(view)Author: Serhiy Storchaka (serhiy.storchaka)*(Python committer)Date: 2019-08-25 09:41
How large is benefit from special casing exact floats?
History
DateUserActionArgs
2022-04-11 14:59:19adminsetgithub: 82123
2019-08-25 09:41:06serhiy.storchakasetnosy: +serhiy.storchaka
messages: +msg350443
2019-08-25 02:45:37rhettingersetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2019-08-25 02:45:15rhettingersetmessages: +msg350422
2019-08-25 02:25:46rhettingersetpull_requests: +pull_request15166
2019-08-25 02:10:42rhettingersetmessages: +msg350419
2019-08-24 19:18:05rhettingersetmessages: +msg350397
2019-08-24 19:13:30rhettingersetkeywords: +patch
stage: patch review
pull_requests: +pull_request15161
2019-08-24 19:09:51rhettingercreate
Supported byThe Python Software Foundation,
Powered byRoundup
Copyright © 1990-2022,Python Software Foundation
Legal Statements

[8]ページ先頭

©2009-2026 Movatter.jp