mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Issue 19933: Provide default argument for ndigits in round. Patch by Vajrasky Kok.
This commit is contained in:
parent
807b80d4ec
commit
cb39d1f466
4 changed files with 16 additions and 4 deletions
|
@ -1225,8 +1225,8 @@ are always available. They are listed here in alphabetical order.
|
|||
.. function:: round(number[, ndigits])
|
||||
|
||||
Return the floating point value *number* rounded to *ndigits* digits after
|
||||
the decimal point. If *ndigits* is omitted, it defaults to zero. Delegates
|
||||
to ``number.__round__(ndigits)``.
|
||||
the decimal point. If *ndigits* is omitted, it returns the nearest integer
|
||||
to its input. Delegates to ``number.__round__(ndigits)``.
|
||||
|
||||
For the built-in types supporting :func:`round`, values are rounded to the
|
||||
closest multiple of 10 to the power minus *ndigits*; if two multiples are
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue