Skip to content

Commit ea0bbf8

Browse files
committed
Qualifying that the right operand's type must be a *strict* subclass for the reflected method to take precedence avoids an edge case / counter-example when the types are actually equal.
1 parent 7bcc645 commit ea0bbf8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Doc/reference/datamodel.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2376,7 +2376,7 @@ left undefined.
23762376

23772377
.. note::
23782378

2379-
If the right operand's type is a subclass of the left operand's type and that
2379+
If the right operand's type is a strict subclass of the left operand's type and that
23802380
subclass provides the reflected method for the operation, this method will be
23812381
called before the left operand's non-reflected method. This behavior allows
23822382
subclasses to override their ancestors' operations.

0 commit comments

Comments
 (0)