Skip to content

Commit 3bf5d90

Browse files
[3.12] gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891) (GH-114638)
(cherry picked from commit 926881d) Co-authored-by: Sergey B Kirpichev <[email protected]>
1 parent bf35ac1 commit 3bf5d90

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
@@ -172,12 +172,8 @@ Object Protocol
172172
.. c:function:: int PyObject_RichCompareBool(PyObject *o1, PyObject *o2, int opid)
173173
174174
Compare the values of *o1* and *o2* using the operation specified by *opid*,
175-
which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`,
176-
:c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to ``<``,
177-
``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error,
178-
``0`` if the result is false, ``1`` otherwise. This is the equivalent of the
179-
Python expression ``o1 op o2``, where ``op`` is the operator corresponding to
180-
*opid*.
175+
like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if
176+
the result is false, ``1`` otherwise.
181177
182178
.. note::
183179
If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool`

0 commit comments

Comments
 (0)