There was an error while loading. Please reload this page.
1 parent cef1f87 commit 82c9adbCopy full SHA for 82c9adb
1 file changed
Doc/library/functions.rst
@@ -1315,11 +1315,12 @@ are always available. They are listed here in alphabetical order.
1315
equally close, rounding is done toward the even choice (so, for example,
1316
both ``round(0.5)`` and ``round(-0.5)`` are ``0``, and ``round(1.5)`` is
1317
``2``). Any integer value is valid for *ndigits* (positive, zero, or
1318
- negative). The return value is an integer if called with one argument,
1319
- otherwise of the same type as *number*.
+ negative). The return value is an integer if *ndigits* is omitted or
+ ``None``.
1320
+ Otherwise the return value has the same type as *number*.
1321
- For a general Python object ``number``, ``round(number, ndigits)`` delegates to
1322
- ``number.__round__(ndigits)``.
+ For a general Python object ``number``, ``round`` delegates to
1323
+ ``number.__round__``.
1324
1325
.. note::
1326
0 commit comments