Commit 0ee04208 authored by Stefan Behnel's avatar Stefan Behnel

Mention Py_EQ and friends in __richcmp__() docs.

parent c372d2db
...@@ -132,19 +132,22 @@ There are no separate methods for the individual rich comparison operations ...@@ -132,19 +132,22 @@ There are no separate methods for the individual rich comparison operations
:meth:`__richcmp__` which takes an integer indicating which operation is to be :meth:`__richcmp__` which takes an integer indicating which operation is to be
performed, as follows: performed, as follows:
+-----+-----+ +-----+-----+-------+
| < | 0 | | < | 0 | Py_LT |
+-----+-----+ +-----+-----+-------+
| == | 2 | | == | 2 | Py_EQ |
+-----+-----+ +-----+-----+-------+
| > | 4 | | > | 4 | Py_GT |
+-----+-----+ +-----+-----+-------+
| <= | 1 | | <= | 1 | Py_LE |
+-----+-----+ +-----+-----+-------+
| != | 3 | | != | 3 | Py_NE |
+-----+-----+ +-----+-----+-------+
| >= | 5 | | >= | 5 | Py_GE |
+-----+-----+ +-----+-----+-------+
The named constants can be cimported from the ``cpython.object`` module.
They should generally be preferred over plain integers to improve readabilty.
The :meth:`__next__` method The :meth:`__next__` method
---------------------------- ----------------------------
......
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