From: Stefan Behnel Date: Mon, 22 Mar 2010 15:54:27 +0000 (+0100) Subject: cleanup: do not raise unnecessary compiler errors for code that may not even get... X-Git-Tag: 0.13.beta0~255 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=83ecf76f0d5083b991e05cf4c1baeb34026db2bb;p=cython.git cleanup: do not raise unnecessary compiler errors for code that may not even get executed --- 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