projects
/
cython.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
889ffe3
)
who needs lambda anyway ...
author
Stefan Behnel
<scoder@users.berlios.de>
Fri, 25 Apr 2008 21:39:42 +0000
(23:39 +0200)
committer
Stefan Behnel
<scoder@users.berlios.de>
Fri, 25 Apr 2008 21:39:42 +0000
(23:39 +0200)
Cython/Compiler/ExprNodes.py
patch
|
blob
|
history
diff --git
a/Cython/Compiler/ExprNodes.py
b/Cython/Compiler/ExprNodes.py
index 7590565c101fba741644eb9264f2142c4f478ead..9129304c82340738c01988bbecf7729a555a1918 100644
(file)
--- a/
Cython/Compiler/ExprNodes.py
+++ b/
Cython/Compiler/ExprNodes.py
@@
-2853,6
+2853,9
@@
class SizeofVarNode(SizeofNode):
#
#-------------------------------------------------------------------
+def _not_in(x, seq):
+ return x not in seq
+
compile_time_binary_operators = {
'<': operator.lt,
'<=': operator.le,
@@
-2875,8
+2878,8
@@
compile_time_binary_operators = {
'-': operator.sub,
#'/': operator.truediv,
'^': operator.xor,
- 'in':
lambda x, y: x in y
,
- 'not_in':
lambda x, y: x not in y
,
+ 'in':
operator.contains
,
+ 'not_in':
_not_in
,
}
def get_compile_time_binop(node):