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
Xavier Thompson
cython
Commits
7ec14202
Commit
7ec14202
authored
Aug 06, 2020
by
Xavier Thompson
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix handling of 'is' and 'is not' comparisons between a cpp object and a pyobject
parent
228ffec9
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
0 deletions
+4
-0
Cython/Compiler/ExprNodes.py
Cython/Compiler/ExprNodes.py
+4
-0
No files found.
Cython/Compiler/ExprNodes.py
View file @
7ec14202
...
...
@@ -13130,6 +13130,10 @@ class PrimaryCmpNode(ExprNode, CmpNode):
def
analyse_cpp_py_comparison
(
self
,
env
):
operator
=
self
.
operator
if
self
.
operator
in
(
'is'
,
'is_not'
):
# non-overridable comparisons, let cpp analysis decide whether this is an error
self
.
analyse_cpp_comparison
(
env
)
return
self
if
self
.
operand2
.
type
.
is_cyp_class
and
operator
in
(
"in"
,
"not_in"
):
# swap operands
self
.
operand1
,
self
.
operand2
=
self
.
operand2
,
self
.
operand1
...
...
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