cleanup: do not raise unnecessary compiler errors for code that may not even get...
authorStefan Behnel <scoder@users.berlios.de>
Mon, 22 Mar 2010 15:54:27 +0000 (16:54 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Mon, 22 Mar 2010 15:54:27 +0000 (16:54 +0100)
Cython/Compiler/Optimize.py

index 42e2363502a18c7a9939c7e61020345000ad4654..db1750d00187e3f0090b37630739b6d08e82f57c 100644 (file)
@@ -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