avoid redundant None check on literals
authorStefan Behnel <scoder@users.berlios.de>
Sun, 21 Mar 2010 07:47:07 +0000 (08:47 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 21 Mar 2010 07:47:07 +0000 (08:47 +0100)
Cython/Compiler/Optimize.py

index 5c6c5ed0167109b110bfc9f40f593d545e146c40..1627692fac1196f23592c81ab6616f08fe5184e6 100644 (file)
@@ -1720,7 +1720,7 @@ class OptimizeBuiltinCalls(Visitor.EnvTransform):
                                 attr_name, is_unbound_method, args=(),
                                 utility_code=None):
         args = list(args)
-        if args:
+        if args and not args[0].is_literal:
             self_arg = args[0]
             if is_unbound_method:
                 self_arg = ExprNodes.NoneCheckNode(