File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -1812,12 +1812,15 @@ Basic customization
1812
1812
rather, :meth: `__lt__ ` and :meth: `__gt__ ` are each other's reflection,
1813
1813
:meth: `__le__ ` and :meth: `__ge__ ` are each other's reflection, and
1814
1814
:meth: `__eq__ ` and :meth: `__ne__ ` are their own reflection.
1815
- If the operands are of different types, and right operand's type is
1815
+ If the operands are of different types, and the right operand's type is
1816
1816
a direct or indirect subclass of the left operand's type,
1817
1817
the reflected method of the right operand has priority, otherwise
1818
1818
the left operand's method has priority. Virtual subclassing is
1819
1819
not considered.
1820
1820
1821
+ When no appropriate method returns any value other than :data: `NotImplemented `, the
1822
+ ``== `` and ``!= `` operators will fall back to ``is `` and ``is not ``, respectively.
1823
+
1821
1824
.. method :: object.__hash__(self)
1822
1825
1823
1826
.. index ::
You can’t perform that action at this time.
0 commit comments