Skip to content
Closed
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1297,7 +1297,7 @@ are always available. They are listed here in alphabetical order.
arguments starting at ``0``).


.. function:: round(number[, ndigits])
.. function:: round(number, ndigits=None)

Return *number* rounded to *ndigits* precision after the decimal
point. If *ndigits* is omitted or is ``None``, it returns the
Expand All @@ -1308,8 +1308,8 @@ 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``.
Otherwise the return value has the same type as *number*.

For a general Python object ``number``, ``round(number, ndigits)`` delegates to
``number.__round__(ndigits)``.
Expand Down