From b2b3803081f07600710273b4f902b5be6e5596e7 Mon Sep 17 00:00:00 2001 From: "Miss Skeleton (bot)" <31488909+miss-islington@users.noreply.github.com> Date: Wed, 21 Oct 2020 17:07:59 -0700 Subject: 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 --- Doc/reference/datamodel.rst | 14 ++++++++------ .../2020-10-21-14-40-54.bpo-41910.CzBMit.rst | 1 + 2 files changed, 9 insertions(+), 6 deletions(-) create mode 100644 Misc/NEWS.d/next/Core and Builtins/2020-10-21-14-40-54.bpo-41910.CzBMit.rst diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 14c3845..da38bba 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