mirror of
https://github.com/python/cpython.git
synced 2025-10-06 07:02:33 +00:00
bpo-29677: DOC: clarify documentation for round
(GH-357) (GH-863)
(cherry picked from commit 6003db7db5
)
This commit is contained in:
parent
cb09f421c8
commit
8994f36287
1 changed files with 2 additions and 1 deletions
|
@ -1241,7 +1241,8 @@ are always available. They are listed here in alphabetical order.
|
||||||
closest multiple of 10 to the power minus *ndigits*; if two multiples are
|
closest multiple of 10 to the power minus *ndigits*; if two multiples are
|
||||||
equally close, rounding is done toward the even choice (so, for example,
|
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
|
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is
|
||||||
``2``). The return value is an integer if called with one argument,
|
``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*.
|
otherwise of the same type as *number*.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue