mirror of
https://github.com/python/cpython.git
synced 2025-10-09 16:34:44 +00:00
bpo-44072: fix Complex, Integral docs for **
(GH-25986)
In numbers module docstrings and docs.
(cherry picked from commit 4aa63d65a9
)
Co-authored-by: Rory Yorke <rory.yorke@gmail.com>
This commit is contained in:
parent
c90642b0d4
commit
fa9de0c383
3 changed files with 13 additions and 6 deletions
|
@ -27,8 +27,8 @@ The numeric tower
|
|||
Subclasses of this type describe complex numbers and include the operations
|
||||
that work on the built-in :class:`complex` type. These are: conversions to
|
||||
:class:`complex` and :class:`bool`, :attr:`.real`, :attr:`.imag`, ``+``,
|
||||
``-``, ``*``, ``/``, :func:`abs`, :meth:`conjugate`, ``==``, and ``!=``. All
|
||||
except ``-`` and ``!=`` are abstract.
|
||||
``-``, ``*``, ``/``, ``**``, :func:`abs`, :meth:`conjugate`, ``==``, and
|
||||
``!=``. All except ``-`` and ``!=`` are abstract.
|
||||
|
||||
.. attribute:: real
|
||||
|
||||
|
@ -76,8 +76,9 @@ The numeric tower
|
|||
|
||||
Subtypes :class:`Rational` and adds a conversion to :class:`int`. Provides
|
||||
defaults for :func:`float`, :attr:`~Rational.numerator`, and
|
||||
:attr:`~Rational.denominator`. Adds abstract methods for ``**`` and
|
||||
bit-string operations: ``<<``, ``>>``, ``&``, ``^``, ``|``, ``~``.
|
||||
:attr:`~Rational.denominator`. Adds abstract methods for :func:`pow` with
|
||||
modulus and bit-string operations: ``<<``, ``>>``, ``&``, ``^``, ``|``,
|
||||
``~``.
|
||||
|
||||
|
||||
Notes for type implementors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue