Skip to content

Commit a3953cb

Browse files
[3.11] gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891) (GH-114637)
(cherry picked from commit 926881d) Co-authored-by: Sergey B Kirpichev <[email protected]>
1 parent dfef41a commit a3953cb

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

Doc/c-api/object.rst

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -180,12 +180,8 @@ Object Protocol
180180
.. c:function:: int PyObject_RichCompareBool(PyObject *o1, PyObject *o2, int opid)
181181
182182
Compare the values of *o1* and *o2* using the operation specified by *opid*,
183-
which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`,
184-
:c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to ``<``,
185-
``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error,
186-
``0`` if the result is false, ``1`` otherwise. This is the equivalent of the
187-
Python expression ``o1 op o2``, where ``op`` is the operator corresponding to
188-
*opid*.
183+
like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if
184+
the result is false, ``1`` otherwise.
189185
190186
.. note::
191187
If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool`

0 commit comments

Comments
 (0)