Object.__eq__ description appears wrong for some cases

From 3. Data model — Python 3.12.0 documentation

These are the so-called “rich comparison” methods. The correspondence between operator symbols and method names is as follows: x<y calls x.__lt__(y), x<=y calls x.__le__(y), x==y calls x.__eq__(y), x!=y calls x.__ne__(y), x>y calls x.__gt__(y), and x>=y calls x.__ge__(y).

However, this does not appear to cover the case where y is an instance of a subclass of x. In these cases, y.__eq__(x) is tried first (so that subclasses can specialize the behaviour from either side of the operator).

I modified the example to try to make the issue as clear as possible:

def _log(lhs, rhs):
    print(f'compare {lhs} == {rhs}')

class A:
    def __str__(self):
        return '<A instance>'
    def __eq__(self, other):
        _log(self, other)
        return True

class B(A):
    def __str__(self):
        return '<B instance>'
    def __eq__(self, other):
        _log(self, other)
        return False

class C: # note, not related by inheritance
    def __str__(self):
        return '<C instance>'
    def __eq__(self, other):
        _log(self, other)
        return False

a, b, c = A(), B(), C()

The results are clear:

>>> a == b
compare <B instance> == <A instance>
False
>>> a == c
compare <A instance> == <C instance>
True

If the operands are of different types, and right operand’s type is a direct or indirect subclass of the left operand’s type, the reflected method of the right operand has priority, otherwise the left operand’s method has priority. Virtual subclassing is not considered.

Same page.

I think the section is not written clearly because it has to contradict itself about the order of operands later. It doesn’t need to mention operands in order to draw the correspondence between operators and methods, and that operand order isn’t trivially established, so IMO it shouldn’t mention the order up front.

Proposed:

These are the so-called “rich comparison” methods. The correspondence between operator symbols and method names is as follows: < is directly implemented with __lt__, <= with __le__, == with __eq__, != with __ne__, > with __gt__, and >= with __ge__.

It might also make sense to put the cited text about different-type operators immediately after that, instead of at the end of the section.