summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Dickinson <mdickinson@enthought.com>2012-09-20 19:51:53 (GMT)
committerMark Dickinson <mdickinson@enthought.com>2012-09-20 19:51:53 (GMT)
commit7c6c80d89f60c9b28cfb08d32c61108b16b2461a (patch)
treeaa8d2e3ef481466e049c2649dec895f14bf016c4
parentca8aa4acf6755dd012706e1e38fb737ae83ab5c6 (diff)
parent4e12ad19c984dc8dfdb8c326b0ea44c490408579 (diff)
downloadcpython-7c6c80d89f60c9b28cfb08d32c61108b16b2461a.zip
cpython-7c6c80d89f60c9b28cfb08d32c61108b16b2461a.tar.gz
cpython-7c6c80d89f60c9b28cfb08d32c61108b16b2461a.tar.bz2
Issue 15985: merge from 3.2.
-rw-r--r--Doc/library/functions.rst18
1 files changed, 9 insertions, 9 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 6156c5d..ac71eb2 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -1098,18 +1098,18 @@ are always available. They are listed here in alphabetical order.
arguments starting at ``0``).
-.. function:: round(x[, n])
+.. function:: round(number[, ndigits])
- Return the floating point value *x* rounded to *n* digits after the decimal
- point. If *n* is omitted, it defaults to zero. Delegates to
- ``x.__round__(n)``.
+ Return the floating point value *number* rounded to *ndigits* digits after
+ the decimal point. If *ndigits* is omitted, it defaults to zero. Delegates
+ to ``number.__round__(ndigits)``.
For the built-in types supporting :func:`round`, values are rounded to the
- closest multiple of 10 to the power minus *n*; 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, otherwise of the
- same type as *x*.
+ 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,
+ otherwise of the same type as *number*.
.. note::