]> granicus.if.org Git - python/commitdiff
Issue #10912: add clarification for PyObject_RichCompareBool comparing identical...
authorEli Bendersky <eliben@gmail.com>
Sat, 30 Apr 2011 05:51:55 +0000 (08:51 +0300)
committerEli Bendersky <eliben@gmail.com>
Sat, 30 Apr 2011 05:51:55 +0000 (08:51 +0300)
Doc/c-api/object.rst

index 6a538b340d5d3ba4b09ae2e08e6298b769eb777c..771667a3d60e5b1d2264882d5e7629405973d276 100644 (file)
@@ -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)