From 57dddae09bb23049a9a3636c47e85e0c8eede42e Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sun, 21 Mar 2010 08:47:07 +0100 Subject: [PATCH] avoid redundant None check on literals --- Cython/Compiler/Optimize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cython/Compiler/Optimize.py b/Cython/Compiler/Optimize.py index 5c6c5ed0..1627692f 100644 --- a/Cython/Compiler/Optimize.py +++ b/Cython/Compiler/Optimize.py @@ -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( -- 2.26.2