mirror of
https://github.com/python/cpython.git
synced 2025-10-02 05:12:23 +00:00
Issue #10912: add clarification for PyObject_RichCompareBool comparing identical objects
This commit is contained in:
parent
bb23bd69b9
commit
11d1171ecf
1 changed files with 3 additions and 0 deletions
|
@ -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)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue