From 51ac89eae6776455e7ae9ef20c9d48228f49ede5 Mon Sep 17 00:00:00 2001 From: Stefan Behnel Date: Sat, 20 Dec 2008 19:49:31 +0100 Subject: [PATCH] more streamlining --- Cython/Compiler/ExprNodes.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Cython/Compiler/ExprNodes.py b/Cython/Compiler/ExprNodes.py index 08bc34b3..7db0030f 100644 --- a/Cython/Compiler/ExprNodes.py +++ b/Cython/Compiler/ExprNodes.py @@ -209,11 +209,11 @@ class ExprNode(Node): nodes = [] for name in self.subexprs: item = getattr(self, name) - if item: - if isinstance(item, ExprNode): - nodes.append(item) - else: + if item is not None: + if type(item) is list: nodes.extend(item) + else: + nodes.append(item) return nodes def result(self): -- 2.26.2