diff options
author | Lisa Roach <lisaroach14@gmail.com> | 2018-05-20 15:00:18 (GMT) |
---|---|---|
committer | Serhiy Storchaka <storchaka@gmail.com> | 2018-05-20 15:00:18 (GMT) |
commit | 900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c (patch) | |
tree | a6c42288755d96828a6ca64538ce6c69aefeb323 /Doc/library/functions.rst | |
parent | 9572132ab3c2edddb8087a0112116da866373f79 (diff) | |
download | cpython-900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c.zip cpython-900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c.tar.gz cpython-900c48dba3f3eb8fb03ea766a5646f81c3bf3e9c.tar.bz2 |
bpo-30940: Updating round() docs. (GH-6342)
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r-- | Doc/library/functions.rst | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst index 3b05a3a..457e1c3 100644 --- a/Doc/library/functions.rst +++ b/Doc/library/functions.rst @@ -1329,11 +1329,12 @@ 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``. + 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:: |