Skip to content

Commit 6003db7

Browse files
gerrithollvstinner
authored andcommitted
bpo-29677: DOC: clarify documentation for round (#357)
* DOC: clarify documentation for `round` Clarified that `round` can take a negative value for *ndigits*. * DOC: remove trailing whitespace in previous commit remove trailing whitespace in previous commit
1 parent d67a103 commit 6003db7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Doc/library/functions.rst

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,8 @@ are always available. They are listed here in alphabetical order.
12621262
closest multiple of 10 to the power minus *ndigits*; if two multiples are
12631263
equally close, rounding is done toward the even choice (so, for example,
12641264
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is
1265-
``2``). The return value is an integer if called with one argument,
1265+
``2``). Any integer value is valid for *ndigits* (positive, zero, or
1266+
negative). The return value is an integer if called with one argument,
12661267
otherwise of the same type as *number*.
12671268

12681269
.. note::

0 commit comments

Comments
 (0)