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 @@ -1817,12 +1817,15 @@ Basic customization
1817
1817
rather, :meth: `__lt__ ` and :meth: `__gt__ ` are each other's reflection,
1818
1818
:meth: `__le__ ` and :meth: `__ge__ ` are each other's reflection, and
1819
1819
:meth: `__eq__ ` and :meth: `__ne__ ` are their own reflection.
1820
- If the operands are of different types, and right operand's type is
1820
+ If the operands are of different types, and the right operand's type is
1821
1821
a direct or indirect subclass of the left operand's type,
1822
1822
the reflected method of the right operand has priority, otherwise
1823
1823
the left operand's method has priority. Virtual subclassing is
1824
1824
not considered.
1825
1825
1826
+ When no appropriate method returns any value other than :data: `NotImplemented `, the
1827
+ ``== `` and ``!= `` operators will fall back to ``is `` and ``is not ``, respectively.
1828
+
1826
1829
.. method :: object.__hash__(self)
1827
1830
1828
1831
.. index ::
You can’t perform that action at this time.
0 commit comments