]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.11] gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891) (GH-114637)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 27 Jan 2024 08:02:34 +0000 (09:02 +0100)
committerGitHub <noreply@github.com>
Sat, 27 Jan 2024 08:02:34 +0000 (08:02 +0000)
(cherry picked from commit 926881dc10ebf77069e02e66eea3e0d3ba500fe5)

Co-authored-by: Sergey B Kirpichev <skirpichev@gmail.com>
Doc/c-api/object.rst

index 32f74fb20c7f923be3986b4515f5626dffbf0880..e3a0aaad9a6598dd71c5b9e874206a1da1d222b7 100644 (file)
@@ -180,12 +180,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`