diff options
-rw-r--r-- | Doc/library/stdtypes.rst | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Doc/library/stdtypes.rst b/Doc/library/stdtypes.rst index fc96f45..8e81db8 100644 --- a/Doc/library/stdtypes.rst +++ b/Doc/library/stdtypes.rst @@ -303,7 +303,7 @@ numeric operations have a higher priority than comparison operations): +---------------------+---------------------------------+-------+--------------------+ | ``int(x)`` | *x* converted to integer | \(3) | :func:`int` | +---------------------+---------------------------------+-------+--------------------+ -| ``float(x)`` | *x* converted to floating point | \(6) | :func:`float` | +| ``float(x)`` | *x* converted to floating point | \(4) | :func:`float` | +---------------------+---------------------------------+-------+--------------------+ | ``complex(re, im)`` | a complex number with real part | | :func:`complex` | | | *re*, imaginary part *im*. | | | @@ -314,9 +314,9 @@ numeric operations have a higher priority than comparison operations): +---------------------+---------------------------------+-------+--------------------+ | ``divmod(x, y)`` | the pair ``(x // y, x % y)`` | \(2) | :func:`divmod` | +---------------------+---------------------------------+-------+--------------------+ -| ``pow(x, y)`` | *x* to the power *y* | (7) | :func:`pow` | +| ``pow(x, y)`` | *x* to the power *y* | (5) | :func:`pow` | +---------------------+---------------------------------+-------+--------------------+ -| ``x ** y`` | *x* to the power *y* | (7) | | +| ``x ** y`` | *x* to the power *y* | (5) | | +---------------------+---------------------------------+-------+--------------------+ .. index:: @@ -347,11 +347,11 @@ Notes: as in C; see functions :func:`floor` and :func:`ceil` in the :mod:`math` module for well-defined conversions. -(6) +(4) float also accepts the strings "nan" and "inf" with an optional prefix "+" or "-" for Not a Number (NaN) and positive or negative infinity. -(7) +(5) Python defines ``pow(0, 0)`` and ``0 ** 0`` to be ``1``, as is common for programming languages. |