projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
01e0790
)
fix switch transform
author
Stefan Behnel
<scoder@users.berlios.de>
Tue, 20 Oct 2009 19:16:12 +0000
(21:16 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Tue, 20 Oct 2009 19:16:12 +0000
(21:16 +0200)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 58e7878f7a59c16486789903a55a362bdf1be21a..d61d36de767922bc0706f5c283b93aecd217c2e7 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-5168,6
+5168,11
@@
class CmpNode(object):
error(self.pos, "Invalid types for '%s' (%s, %s)" %
(op, operand1.type, operand2.type))
+ def is_python_comparison(self):
+ return (self.has_python_operands()
+ or (self.cascade and self.cascade.is_python_comparison())
+ or self.operator in ('in', 'not_in'))
+
def coerce_operands_to(self, dst_type, env):
operand2 = self.operand2
if operand2.type != dst_type: