summaryrefslogtreecommitdiffstats
path: root/Doc/library/functions.rst
diff options
context:
space:
mode:
authorJeffrey Yasskin <jyasskin@gmail.com>2008-01-05 08:47:13 (GMT)
committerJeffrey Yasskin <jyasskin@gmail.com>2008-01-05 08:47:13 (GMT)
commit9871d8fe22566acf68bf336d04d3a1dbd51f3269 (patch)
tree89540b4ff5f893e36c916534be2f07b5a7166fc1 /Doc/library/functions.rst
parentf7476c4d463b5770b98d980bcd9bff3db981445d (diff)
downloadcpython-9871d8fe22566acf68bf336d04d3a1dbd51f3269.zip
cpython-9871d8fe22566acf68bf336d04d3a1dbd51f3269.tar.gz
cpython-9871d8fe22566acf68bf336d04d3a1dbd51f3269.tar.bz2
Continue rolling back pep-3141 changes that changed behavior from 2.5. This
round included: * Revert round to its 2.6 behavior (half away from 0). * Because round, floor, and ceil always return float again, it's no longer necessary to have them delegate to __xxx___, so I've ripped that out of their implementations and the Real ABC. This also helps in implementing types that work in both 2.6 and 3.0: you return int from the __xxx__ methods, and let it get enabled by the version upgrade. * Make pow(-1, .5) raise a ValueError again.
Diffstat (limited to 'Doc/library/functions.rst')
-rw-r--r--Doc/library/functions.rst11
1 files changed, 4 insertions, 7 deletions
diff --git a/Doc/library/functions.rst b/Doc/library/functions.rst
index 3236ccd..0133e5c 100644
--- a/Doc/library/functions.rst
+++ b/Doc/library/functions.rst
@@ -986,13 +986,10 @@ available. They are listed here in alphabetical order.
.. function:: round(x[, n])
Return the floating point value *x* rounded to *n* digits after the decimal
- point. If *n* is omitted, it defaults to zero. 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``). Delegates to ``x.__round__(n)``.
-
- .. versionchanged:: 2.6
+ point. If *n* is omitted, it defaults to zero. The result is a floating point
+ number. Values are rounded to the closest multiple of 10 to the power minus
+ *n*; if two multiples are equally close, rounding is done away from 0 (so. for
+ example, ``round(0.5)`` is ``1.0`` and ``round(-0.5)`` is ``-1.0``).
.. function:: set([iterable])