-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-30940: Updating round() docs. #6342
Conversation
Doc/library/functions.rst
Outdated
@@ -1331,11 +1331,11 @@ are always available. They are listed here in alphabetical order. | |||
equally close, rounding is done toward the even choice (so, for example, | |||
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is | |||
``2``). Any integer value is valid for *ndigits* (positive, zero, or | |||
negative). The return value is an integer if called with one argument, | |||
otherwise of the same type as *number*. | |||
negative). The return value is an integer if *ndigits* is omitted or *None*. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It usually is formatted as ``None``
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @lisroach, thank you for your PR, it's really appreciated and you have upgraded your PR with the recommendation of @serhiy-storchaka. Thank you.
@mdickinson, could you please make a look? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@serhiy-storchaka Would you mind merging? I'm not confident that I have the backport process down yet. Thanks. |
Thanks @lisroach for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6, 3.7. |
(cherry picked from commit 900c48d) Co-authored-by: Lisa Roach <[email protected]>
GH-7009 is a backport of this pull request to the 3.7 branch. |
(cherry picked from commit 900c48d) Co-authored-by: Lisa Roach <[email protected]>
GH-7010 is a backport of this pull request to the 3.6 branch. |
(cherry picked from commit 900c48d) Co-authored-by: Lisa Roach <[email protected]>
(cherry picked from commit 900c48d) Co-authored-by: Lisa Roach <[email protected]>
Updating the round docs to make it more clear what happens when None is the second argument to round().
https://bugs.python.org/issue30940