diff options
author | Sergey B Kirpichev <skirpichev@gmail.com> | 2024-01-27 07:55:33 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-01-27 07:55:33 (GMT) |
commit | 926881dc10ebf77069e02e66eea3e0d3ba500fe5 (patch) | |
tree | 441a9cebff38af505e67c3b014b605d7d29229f1 /Doc/c-api | |
parent | 7a7bce5a0ab249407e866a1e955d21fa2b0c8506 (diff) | |
download | cpython-926881dc10ebf77069e02e66eea3e0d3ba500fe5.zip cpython-926881dc10ebf77069e02e66eea3e0d3ba500fe5.tar.gz cpython-926881dc10ebf77069e02e66eea3e0d3ba500fe5.tar.bz2 |
gh-113445: Amend PyObject_RichCompareBool() docs (GH-113891)
Diffstat (limited to 'Doc/c-api')
-rw-r--r-- | Doc/c-api/object.rst | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/Doc/c-api/object.rst b/Doc/c-api/object.rst index 4f65677..1247641 100644 --- a/Doc/c-api/object.rst +++ b/Doc/c-api/object.rst @@ -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` |