more streamlining
authorStefan Behnel <scoder@users.berlios.de>
Sat, 20 Dec 2008 18:49:31 +0000 (19:49 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sat, 20 Dec 2008 18:49:31 +0000 (19:49 +0100)
Cython/Compiler/ExprNodes.py

index 08bc34b38c90fabf1b5a45f1f44ad694d9186ab1..7db0030f34f2da596709f8398935008f649b7504 100644 (file)
@@ -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):