summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/object.rst
diff options
context:
space:
mode:
authorEli Bendersky <eliben@gmail.com>2011-01-15 10:23:34 (GMT)
committerEli Bendersky <eliben@gmail.com>2011-01-15 10:23:34 (GMT)
commitad30c4206af997f8c94c4e62a3e66abfa633442b (patch)
tree928ef685296fdde50302f700b440d94c5d3757e8 /Doc/c-api/object.rst
parent22c336645cb8d00e35a603b791dfca5ca72a00ec (diff)
downloadcpython-ad30c4206af997f8c94c4e62a3e66abfa633442b.zip
cpython-ad30c4206af997f8c94c4e62a3e66abfa633442b.tar.gz
cpython-ad30c4206af997f8c94c4e62a3e66abfa633442b.tar.bz2
Issue #10912: Clarify the documentation of PyObject_RichCompareBool. Thanks to Devin Jeanpierre for spotting the problem.
Diffstat (limited to 'Doc/c-api/object.rst')
-rw-r--r--Doc/c-api/object.rst3
1 files changed, 3 insertions, 0 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst
index 8410934..afa08c9 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`.
.. c:function:: PyObject* PyObject_Repr(PyObject *o)