@@ -1390,12 +1390,14 @@ Basic customization
1390
1390
context (e.g., in the condition of an ``if `` statement), Python will call
1391
1391
:func: `bool ` on the value to determine if the result is true or false.
1392
1392
1393
- By default, :meth: `__ne__ ` delegates to :meth: `__eq__ ` and
1394
- inverts the result unless it is ``NotImplemented ``. There are no other
1395
- implied relationships among the comparison operators, for example,
1396
- the truth of ``(x<y or x==y) `` does not imply ``x<=y ``.
1397
- To automatically generate ordering operations from a single root operation,
1398
- see :func: `functools.total_ordering `.
1393
+ By default, ``object `` implements :meth: `__eq__ ` by using ``is ``, returning
1394
+ ``NotImplemented `` in the case of a false comparison:
1395
+ ``True if x is y else NotImplemented ``. For :meth: `__ne__ `, by default it
1396
+ delegates to :meth: `__eq__ ` and inverts the result unless it is
1397
+ ``NotImplemented ``. There are no other implied relationships among the
1398
+ comparison operators or default implementations; for example, the truth of
1399
+ ``(x<y or x==y) `` does not imply ``x<=y ``. To automatically generate ordering
1400
+ operations from a single root operation, see :func: `functools.total_ordering `.
1399
1401
1400
1402
See the paragraph on :meth: `__hash__ ` for
1401
1403
some important notes on creating :term: `hashable ` objects which support
0 commit comments