Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cython
Commits
0ee04208
Commit
0ee04208
authored
Sep 03, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Mention Py_EQ and friends in __richcmp__() docs.
parent
c372d2db
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
13 deletions
+16
-13
docs/src/userguide/special_methods.rst
docs/src/userguide/special_methods.rst
+16
-13
No files found.
docs/src/userguide/special_methods.rst
View file @
0ee04208
...
@@ -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
----------------------------
----------------------------
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment