This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Convert round() to Arument Clinic
Type: enhancement Stage: resolved
Components: Interpreter Core Versions: Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: mark.dickinson, rhettinger, serhiy.storchaka
Priority: normal Keywords:

Created on 2017-07-17 15:47 by serhiy.storchaka, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 2740 merged serhiy.storchaka, 2017-07-17 15:49
Messages (2)
msg298539 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-07-17 15:47
When the builtins module was converted to Argument Clinic, round() was omitted because existing signature of round() wasn't supported with the inspect module. Now round() supports None as the value for the ndigits arguments, and this is the default value. round() now has the signature round(number, ndigits=None).

Proposed PR converts round() to Argument Clinic. This has two benefits:

1. inspect.signature() now works with round.

2. Faster parsing keyword arguments.
msg306277 - (view) Author: Serhiy Storchaka (serhiy.storchaka) * (Python committer) Date: 2017-11-15 15:51
New changeset aca7f574b06c72c85a5e3e4b16a8a5e384a7c4a8 by Serhiy Storchaka in branch 'master':
bpo-30950: Convert round() to Argument Clinic. (#2740)
https://github.com/python/cpython/commit/aca7f574b06c72c85a5e3e4b16a8a5e384a7c4a8
History
Date User Action Args
2022-04-11 14:58:49adminsetgithub: 75133
2017-11-15 15:51:50serhiy.storchakasetstatus: open -> closed
dependencies: - Documentation for round() is incorrect.
resolution: fixed
stage: patch review -> resolved
2017-11-15 15:51:16serhiy.storchakasetmessages: + msg306277
2017-07-17 15:50:59serhiy.storchakasetnosy: + rhettinger, mark.dickinson
dependencies: + Documentation for round() is incorrect.
2017-07-17 15:49:06serhiy.storchakasetpull_requests: + pull_request2800
2017-07-17 15:47:25serhiy.storchakacreate