From d737fed4eee08788aa44d8104ada04883abc1e3d Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Fri, 25 Apr 2008 23:39:42 +0200 Subject: [PATCH] who needs lambda anyway ... --- Cython/Compiler/ExprNodes.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 7590565c..9129304c 100644 --- 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): -- 2.26.2