Commit d737fed4 authored by Stefan Behnel's avatar Stefan Behnel

who needs lambda anyway ...

parent 889ffe3c
...@@ -2853,6 +2853,9 @@ class SizeofVarNode(SizeofNode): ...@@ -2853,6 +2853,9 @@ class SizeofVarNode(SizeofNode):
# #
#------------------------------------------------------------------- #-------------------------------------------------------------------
def _not_in(x, seq):
return x not in seq
compile_time_binary_operators = { compile_time_binary_operators = {
'<': operator.lt, '<': operator.lt,
'<=': operator.le, '<=': operator.le,
...@@ -2875,8 +2878,8 @@ compile_time_binary_operators = { ...@@ -2875,8 +2878,8 @@ compile_time_binary_operators = {
'-': operator.sub, '-': operator.sub,
#'/': operator.truediv, #'/': operator.truediv,
'^': operator.xor, '^': operator.xor,
'in': lambda x, y: x in y, 'in': operator.contains,
'not_in': lambda x, y: x not in y, 'not_in': _not_in,
} }
def get_compile_time_binop(node): def get_compile_time_binop(node):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment