From 11d1171ecf1608f3c7de658be223633becc68a11 Mon Sep 17 00:00:00 2001 From: Eli Bendersky Date: Sat, 30 Apr 2011 08:51:55 +0300 Subject: [PATCH] Issue #10912: add clarification for PyObject_RichCompareBool comparing identical objects --- Doc/c-api/object.rst | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 6a538b340d..771667a3d6 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -108,6 +108,9 @@ Object Protocol Python expression ``o1 op o2``, where ``op`` is the operator corresponding to *opid*. +.. note:: + If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool` + will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`. .. cfunction:: int PyObject_Cmp(PyObject *o1, PyObject *o2, int *result) -- 2.50.1