From: Brett Cannon Date: Wed, 21 Oct 2020 23:24:38 +0000 (-0700) Subject: bpo-41910: specify the default implementations of object.__eq__ and object.__ne__... X-Git-Tag: v3.10.0a2~113 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=3c69f0c933d4790855929f1fcd74e4a0fefb5d52;p=thirdparty%2FPython%2Fcpython.git bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874) See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython. Automerge-Triggered-By: GH:brettcannon --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index ab4eb478efb8..d92e19761a96 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1395,12 +1395,14 @@ Basic customization context (e.g., in the condition of an ``if`` statement), Python will call :func:`bool` on the value to determine if the result is true or false. - By default, :meth:`__ne__` delegates to :meth:`__eq__` and - inverts the result unless it is ``NotImplemented``. There are no other - implied relationships among the comparison operators, for example, - the truth of ``(x