Commit 51ac89ea authored by Stefan Behnel's avatar Stefan Behnel

more streamlining

parent 91525792
...@@ -209,11 +209,11 @@ class ExprNode(Node): ...@@ -209,11 +209,11 @@ class ExprNode(Node):
nodes = [] nodes = []
for name in self.subexprs: for name in self.subexprs:
item = getattr(self, name) item = getattr(self, name)
if item: if item is not None:
if isinstance(item, ExprNode): if type(item) is list:
nodes.append(item)
else:
nodes.extend(item) nodes.extend(item)
else:
nodes.append(item)
return nodes return nodes
def result(self): def result(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment