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
Gwenaël Samain
cython
Commits
32290bf8
Commit
32290bf8
authored
Nov 24, 2017
by
Stefan Behnel
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch '0.27.x'
parents
f68639da
8b6131af
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
Cython/Compiler/Nodes.py
Cython/Compiler/Nodes.py
+2
-2
tests/run/ext_auto_richcmp.py
tests/run/ext_auto_richcmp.py
+18
-0
No files found.
Cython/Compiler/Nodes.py
View file @
32290bf8
...
...
@@ -4853,8 +4853,8 @@ class CClassDefNode(ClassDefNode):
is_buffer
=
func
.
name
in
(
'__getbuffer__'
,
'__releasebuffer__'
)
if
(
func
.
is_special
and
Options
.
docstrings
and
func
.
wrapperbase_cname
and
not
is_buffer
):
slot
=
TypeSlots
.
method_name_to_slot
[
func
.
name
]
preprocessor_guard
=
slot
.
preprocessor_guard_code
()
slot
=
TypeSlots
.
method_name_to_slot
.
get
(
func
.
name
)
preprocessor_guard
=
slot
.
preprocessor_guard_code
()
if
slot
else
None
if
preprocessor_guard
:
code
.
putln
(
preprocessor_guard
)
code
.
putln
(
'#if CYTHON_COMPILING_IN_CPYTHON'
)
...
...
tests/run/ext_auto_richcmp.py
View file @
32290bf8
...
...
@@ -78,8 +78,12 @@ class ClassEq(X):
... else: a >= b
Traceback (most recent call last):
TypeError...
>>> print(a.__eq__.__doc__)
EQ
"""
def
__eq__
(
self
,
other
):
"""EQ"""
assert
1
<=
self
.
x
<=
2
assert
isinstance
(
self
,
ClassEq
),
type
(
self
)
if
isinstance
(
other
,
X
):
...
...
@@ -141,8 +145,14 @@ class ClassEqNe(ClassEq):
... else: a >= b
Traceback (most recent call last):
TypeError...
#>>> print(a.__eq__.__doc__)
#EQ
>>> print(a.__ne__.__doc__)
NE
"""
def
__ne__
(
self
,
other
):
"""NE"""
assert
1
<=
self
.
x
<=
2
assert
isinstance
(
self
,
ClassEqNe
),
type
(
self
)
if
isinstance
(
other
,
X
):
...
...
@@ -240,8 +250,16 @@ class ClassEqNeGe(ClassEqNe):
... else: a >= 'x'
Traceback (most recent call last):
TypeError...
#>>> print(a.__eq__.__doc__)
#EQ
#>>> print(a.__ne__.__doc__)
#NE
>>> print(a.__ge__.__doc__)
GE
"""
def
__ge__
(
self
,
other
):
"""GE"""
assert
1
<=
self
.
x
<=
2
assert
isinstance
(
self
,
ClassEqNeGe
),
type
(
self
)
if
isinstance
(
other
,
X
):
...
...
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