Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4e12ad1

Browse files
committed
Issue 15985: fix round argument names in documentation. Thanks Chris Jerdonek.
1 parent 694f233 commit 4e12ad1

1 file changed

Lines changed: 9 additions & 9 deletions

File tree

Doc/library/functions.rst

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1132,18 +1132,18 @@ are always available. They are listed here in alphabetical order.
11321132
arguments starting at ``0``).
11331133

11341134

1135-
.. function:: round(x[, n])
1135+
.. function:: round(number[, ndigits])
11361136

1137-
Return the floating point value *x* rounded to *n* digits after the decimal
1138-
point. If *n* is omitted, it defaults to zero. Delegates to
1139-
``x.__round__(n)``.
1137+
Return the floating point value *number* rounded to *ndigits* digits after
1138+
the decimal point. If *ndigits* is omitted, it defaults to zero. Delegates
1139+
to ``number.__round__(ndigits)``.
11401140

11411141
For the built-in types supporting :func:`round`, values are rounded to the
1142-
closest multiple of 10 to the power minus *n*; if two multiples are equally
1143-
close, rounding is done toward the even choice (so, for example, both
1144-
``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is ``2``).
1145-
The return value is an integer if called with one argument, otherwise of the
1146-
same type as *x*.
1142+
closest multiple of 10 to the power minus *ndigits*; if two multiples are
1143+
equally close, rounding is done toward the even choice (so, for example,
1144+
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is
1145+
``2``). The return value is an integer if called with one argument,
1146+
otherwise of the same type as *number*.
11471147

11481148
.. note::
11491149

0 commit comments

Comments
 (0)