From 83ecf76f0d5083b991e05cf4c1baeb34026db2bb Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Mon, 22 Mar 2010 16:54:27 +0100 Subject: [PATCH] cleanup: do not raise unnecessary compiler errors for code that may not even get executed --- Cython/Compiler/Optimize.py | 3 --- 1 file changed, 3 deletions(-) diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index 42e23635..db1750d0 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -1262,9 +1262,6 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform): is_temp = node.is_temp, utility_code = include_string_h_utility_code) elif arg.type.is_pyobject: - if isinstance(arg, ExprNodes.NoneNode): - error(node.pos, "object of type 'NoneType' has no len()") - return node cfunc_name = self._map_to_capi_len_function(arg.type) if cfunc_name is None: return node -- 2.26.2