Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ad30c42

Browse files
committed
Issue #10912: Clarify the documentation of PyObject_RichCompareBool. Thanks to Devin Jeanpierre for spotting the problem.
1 parent 22c3366 commit ad30c42

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Doc/c-api/object.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,9 @@ Object Protocol
108108
Python expression ``o1 op o2``, where ``op`` is the operator corresponding to
109109
*opid*.
110110
111+
.. note::
112+
If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool`
113+
will always return ``1`` for :const:`Py_EQ` and ``0`` for :const:`Py_NE`.
111114
112115
.. c:function:: PyObject* PyObject_Repr(PyObject *o)
113116

0 commit comments

Comments
 (0)