bpo-30940: Updating round() docs. (GH-6342) (GH-7009)

(cherry picked from commit 900c48dba3)

Co-authored-by: Lisa Roach <lisaroach14@gmail.com>
This commit is contained in:
Miss Islington (bot) 2018-05-20 08:28:15 -07:00 committed by Serhiy Storchaka
parent 296b60acd0
commit 736e3b3219
1 changed files with 5 additions and 4 deletions

View File

@ -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, 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 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 ``2``). Any integer value is valid for *ndigits* (positive, zero, or
negative). The return value is an integer if called with one argument, negative). The return value is an integer if *ndigits* is omitted or
otherwise of the same type as *number*. ``None``.
Otherwise the return value has the same type as *number*.
For a general Python object ``number``, ``round(number, ndigits)`` delegates to For a general Python object ``number``, ``round`` delegates to
``number.__round__(ndigits)``. ``number.__round__``.
.. note:: .. note::