]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891)
authorSergey B Kirpichev <skirpichev@gmail.com>
Sat, 27 Jan 2024 07:55:33 +0000 (10:55 +0300)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 07:55:33 +0000 (09:55 +0200)
Doc/c-api/object.rst

index 4f656779c80b1a29c97f48bf994bfad31694ab57..12476412799a4f14ffa868ba739792407005b345 100644 (file)
@@ -229,12 +229,8 @@ Object Protocol
 .. c:function:: int PyObject_RichCompareBool(PyObject *o1, PyObject *o2, int opid)
 
    Compare the values of *o1* and *o2* using the operation specified by *opid*,
-   which must be one of :c:macro:`Py_LT`, :c:macro:`Py_LE`, :c:macro:`Py_EQ`,
-   :c:macro:`Py_NE`, :c:macro:`Py_GT`, or :c:macro:`Py_GE`, corresponding to ``<``,
-   ``<=``, ``==``, ``!=``, ``>``, or ``>=`` respectively. Returns ``-1`` on error,
-   ``0`` if the result is false, ``1`` otherwise. This is the equivalent of the
-   Python expression ``o1 op o2``, where ``op`` is the operator corresponding to
-   *opid*.
+   like :c:func:`PyObject_RichCompare`, but returns ``-1`` on error, ``0`` if
+   the result is false, ``1`` otherwise.
 
 .. note::
    If *o1* and *o2* are the same object, :c:func:`PyObject_RichCompareBool`