summaryrefslogtreecommitdiffstats
path: root/Doc/library/numbers.rst
diff options
context:
space:
mode:
authorEzio Melotti <ezio.melotti@gmail.com>2023-10-11 20:24:12 (GMT)
committerGitHub <noreply@github.com>2023-10-11 20:24:12 (GMT)
commitbb7923f556537a463c403dc1097726d8a8e1a6f2 (patch)
tree8efe3bdbcad4b383d2c584ecbd5d1dc0fdaa4c9c /Doc/library/numbers.rst
parentc523ce0f434582580a3721e15cb7dd6b56ad0236 (diff)
downloadcpython-bb7923f556537a463c403dc1097726d8a8e1a6f2.zip
cpython-bb7923f556537a463c403dc1097726d8a8e1a6f2.tar.gz
cpython-bb7923f556537a463c403dc1097726d8a8e1a6f2.tar.bz2
gh-110631: Fix reST indentation in `Doc/library` (#110685)
Fix wrong indentation in the Doc/library dir.
Diffstat (limited to 'Doc/library/numbers.rst')
-rw-r--r--Doc/library/numbers.rst34
1 files changed, 17 insertions, 17 deletions
diff --git a/Doc/library/numbers.rst b/Doc/library/numbers.rst
index b3dce15..2a05b56 100644
--- a/Doc/library/numbers.rst
+++ b/Doc/library/numbers.rst
@@ -160,23 +160,23 @@ refer to ``MyIntegral`` and ``OtherTypeIKnowAbout`` as
of :class:`Complex` (``a : A <: Complex``), and ``b : B <:
Complex``. I'll consider ``a + b``:
- 1. If ``A`` defines an :meth:`__add__` which accepts ``b``, all is
- well.
- 2. If ``A`` falls back to the boilerplate code, and it were to
- return a value from :meth:`__add__`, we'd miss the possibility
- that ``B`` defines a more intelligent :meth:`__radd__`, so the
- boilerplate should return :const:`NotImplemented` from
- :meth:`__add__`. (Or ``A`` may not implement :meth:`__add__` at
- all.)
- 3. Then ``B``'s :meth:`__radd__` gets a chance. If it accepts
- ``a``, all is well.
- 4. If it falls back to the boilerplate, there are no more possible
- methods to try, so this is where the default implementation
- should live.
- 5. If ``B <: A``, Python tries ``B.__radd__`` before
- ``A.__add__``. This is ok, because it was implemented with
- knowledge of ``A``, so it can handle those instances before
- delegating to :class:`Complex`.
+1. If ``A`` defines an :meth:`__add__` which accepts ``b``, all is
+ well.
+2. If ``A`` falls back to the boilerplate code, and it were to
+ return a value from :meth:`__add__`, we'd miss the possibility
+ that ``B`` defines a more intelligent :meth:`__radd__`, so the
+ boilerplate should return :const:`NotImplemented` from
+ :meth:`__add__`. (Or ``A`` may not implement :meth:`__add__` at
+ all.)
+3. Then ``B``'s :meth:`__radd__` gets a chance. If it accepts
+ ``a``, all is well.
+4. If it falls back to the boilerplate, there are no more possible
+ methods to try, so this is where the default implementation
+ should live.
+5. If ``B <: A``, Python tries ``B.__radd__`` before
+ ``A.__add__``. This is ok, because it was implemented with
+ knowledge of ``A``, so it can handle those instances before
+ delegating to :class:`Complex`.
If ``A <: Complex`` and ``B <: Real`` without sharing any other knowledge,
then the appropriate shared operation is the one involving the built