]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-29677: DOC: clarify documentation for `round` (#357)
authorGerrit Holl <gerrit.holl@gmail.com>
Mon, 27 Mar 2017 22:15:20 +0000 (23:15 +0100)
committerVictor Stinner <victor.stinner@gmail.com>
Mon, 27 Mar 2017 22:15:20 +0000 (00:15 +0200)
* 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

Doc/library/functions.rst

index 64c9569766cc7d12d2bbcdb663f12355b3fa3a46..2c0ea71c47f413b637bd558ebdc4fc85cc2cec7d 100644 (file)
@@ -1262,7 +1262,8 @@ are always available.  They are listed here in alphabetical order.
    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,
    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*.
 
    .. note::