Skip to content

Commit aeead99

Browse files
gerrithollMariatta
authored andcommitted
bpo-29677: DOC: clarify documentation for round (python#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 (cherry picked from commit 6003db7)
1 parent cb09f42 commit aeead99

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
@@ -1241,7 +1241,8 @@ are always available. They are listed here in alphabetical order.
12411241
closest multiple of 10 to the power minus *ndigits*; if two multiples are
12421242
equally close, rounding is done toward the even choice (so, for example,
12431243
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is
1244-
``2``). The return value is an integer if called with one argument,
1244+
``2``). Any integer value is valid for *ndigits* (positive, zero, or
1245+
negative). The return value is an integer if called with one argument,
12451246
otherwise of the same type as *number*.
12461247

12471248
.. note::

0 commit comments

Comments
 (0)