From: Miss Skeleton (bot) <31488909+miss-islington@users.noreply.github.com> Date: Thu, 22 Oct 2020 00:07:59 +0000 (-0700) Subject: bpo-41910: specify the default implementations of object.__eq__ and object.__ne__... X-Git-Tag: v3.8.7rc1~79 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b2b3803081f07600710273b4f902b5be6e5596e7;p=thirdparty%2FPython%2Fcpython.git bpo-41910: specify the default implementations of object.__eq__ and object.__ne__ (GH-22874) (#22877) See Objects/typeobject.c:object_richcompare() for the implementation of this in CPython. Co-authored-by: Brett Cannon --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 14c38453c357..da38bba91b6b 100644 --- a/Doc/reference/datamodel.rst +++ b/Doc/reference/datamodel.rst @@ -1390,12 +1390,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