Commit 0d50af45 authored by Andrew Svetlov's avatar Andrew Svetlov

Update docs about tp_richcompare

parent 11cda476
......@@ -597,7 +597,9 @@ type objects) *must* have the :attr:`ob_size` field.
.. c:member:: richcmpfunc PyTypeObject.tp_richcompare
An optional pointer to the rich comparison function, whose signature is
``PyObject *tp_richcompare(PyObject *a, PyObject *b, int op)``.
``PyObject *tp_richcompare(PyObject *a, PyObject *b, int op)``. The first
parameter is guaranteed to be an instance of the type that is defined
by :c:type:`PyTypeObject`.
The function should return the result of the comparison (usually ``Py_True``
or ``Py_False``). If the comparison is undefined, it must return
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment