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