Skip to content

Commit f20281b

Browse files
committed
Docs: improve subtype explanation in numbers.rst
1 parent efb0ca2 commit f20281b

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

‎Doc/library/numbers.rst‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -144,10 +144,11 @@ defined as::
144144

145145
There are 5 different cases for a mixed-type operation on subclasses
146146
of :class:`Complex`. I'll refer to all of the above code that doesn't
147-
refer to ``MyIntegral`` and ``OtherTypeIKnowAbout`` as
148-
"boilerplate". ``a`` will be an instance of ``A``, which is a subtype
149-
of :class:`Complex`, and ``b`` will be an instance of ``B``,
150-
which is also a subtype of :class:`Complex`. I'll consider ``a + b``:
147+
refer to ``MyIntegral`` and ``OtherTypeIKnowAbout`` as "boilerplate".
148+
149+
Let ``a`` be an instance of ``A`` and ``b`` be an instance of ``B``,
150+
where both ``A`` and ``B`` are subtypes of :class:`Complex`.
151+
I'll consider ``a + b``:
151152

152153
1. If ``A`` defines an :meth:`~object.__add__` which accepts ``b``, all is
153154
well.

0 commit comments

Comments
 (0)