| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
|
@daxlab, 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. |
Sorry, something went wrong.
| ``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.
Format None with fixed-width font instead of italic.
Sorry, something went wrong.
There was a problem hiding this comment.
Needed to update the docstring too.
The signature of the function can be written as
round(number, ndigits=None)
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM. Thanks for doing this!
Sorry, something went wrong.
|
Please update the docstring. And what is more correct, if *ndigits* is omitted or is ``None`` (as in the first paragraph), or if *ndigits* is omitted or ``None`` (as in the second paragraph)? Or both are correct? |
Sorry, something went wrong.
|
if *ndigits* is omitted or ``None`` looks correct. |
Sorry, something went wrong.
| "round(number, ndigits=None) -> number\n\ | ||
| \n\ | ||
| Round a number to a given precision in decimal digits (default 0 digits).\n\ | ||
| This returns an int when called with one argument, otherwise the\n\ |
There was a problem hiding this comment.
"if ndigits is omitted or None"
Sorry, something went wrong.
|
About
versus
I think either is fine. To my eyes, the first looks a bit clearer, but also a bit more pedantic. |
Sorry, something went wrong.
|
@serhiy-storchaka docs updated. |
Sorry, something went wrong.
|
@serhiy-storchaka plz review. Also, should I send a separate PR to 3.6 branch or you can cherry-pick ? |
Sorry, something went wrong.
|
The current changes LGTM, but see a discussion on the tracker. Perhaps the documentation needs additional clarification. |
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
https://bugs.python.org/issue30940