Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

bpo-29677: DOC: clarify documentation for round#877

Merged
Mariatta merged 4 commits into
python:masterpython/cpython:masterfrom
csabella:masterCopy head branch name to clipboard
Mar 29, 2017
Merged

bpo-29677: DOC: clarify documentation for round#877
Mariatta merged 4 commits into
python:masterpython/cpython:masterfrom
csabella:masterCopy head branch name to clipboard

Conversation

@csabella

Copy link
Copy Markdown
Contributor

Changed the parameter name fromnumber to x to be consistent with documentation for other numeric functions, such as abs, float, math.floor, and mail.ceil. The use of number seemed to indicate an object from the Number class, which with PEP 3141 was not valid for round since round is implemented for Real and not Complex.

Not sure about this one, but changed the phrase *ndigits* digits to be *ndigits* precision to match the help() text.

Moved the delegation line and expanded it to match the similar line in the float() section since that is the only other built-in over the Real class.

Changed the parameter name from 'number' to 'x' to be consistent with documentation for other numeric functions, such as abs, float, math.floor, and mail.ceil.  The use of 'number' seemed to indicate an object from the Number class, which with PEP 3141 was not valid for round since round is implemented for Real and not Complex.

Not sure about this one, but changed the phrase '*ndigits* digits' to be "*ndigits* precision' to match the help() text.

Moved the delegation line and expanded it to match the similar line in the float() section since that is the only other built-in over the Real class.
bpo-29677: DOC: clarify documentation for `round`
@the-knights-who-say-ni

Copy link
Copy Markdown

Hello, and thanks for your contribution!

I'm a bot set up to make sure that the project can legally accept your contribution by verifying you have signed the PSF contributor agreement (CLA).

Unfortunately our records indicate you have not signed the CLA. For legal reasons we need you to sign this before we can look at your contribution. Please follow the steps outlined in the CPython devguide to rectify this issue.

Thanks again to your contribution and we look forward to looking at it!

@mention-bot

Copy link
Copy Markdown

@csabella, thanks for your PR! By analyzing the history of the files in this pull request, we identified @birkenfeld, @benjaminp and @rhettinger to be potential reviewers.

@Mariatta Mariatta added needs backport to 3.5 docs Documentation in the Doc dir labels Mar 28, 2017
Comment thread Doc/library/functions.rst Outdated


.. function:: round(number[, ndigits])
.. function:: round(x[, ndigits])

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

>>> round(x=4)
TypeError: Required argument 'number' (pos 1) not found

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, thank you.

@Mariatta Mariatta merged commit 85deefc into python:master Mar 29, 2017
@Mariatta

Copy link
Copy Markdown
Member

@csabella, thanks for your first contribution to CPython! 🎉
I will backport it into 3.5 and 3.6 later today.

@csabella

Copy link
Copy Markdown
Contributor Author

Thank you, Mariatta. This is so exciting!

Mariatta pushed a commit to Mariatta/cpython that referenced this pull request Mar 30, 2017
Mariatta pushed a commit to Mariatta/cpython that referenced this pull request Mar 30, 2017
Mariatta added a commit that referenced this pull request Mar 30, 2017
Mariatta added a commit that referenced this pull request Mar 30, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants

Morty Proxy This is a proxified and sanitized view of the page, visit original site.