Skip to content
Merged
Changes from 1 commit
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
Next Next commit
Updating round() docs.
  • Loading branch information
lisroach committed Apr 2, 2018
commit b7e00ab23f8eec6f81074ab16f3953ab8c9e42fc
8 changes: 4 additions & 4 deletions Doc/library/functions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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*.

Copy link
Copy Markdown
Member

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``.

Otherwise the return value has the same type as *number*.

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

.. note::

Expand Down