Commit 068e22c3 authored by Stefan Behnel's avatar Stefan Behnel

little tweak for looking up node children

parent 51ac89ea
...@@ -182,9 +182,13 @@ class ExprNode(Node): ...@@ -182,9 +182,13 @@ class ExprNode(Node):
constant_result = constant_value_not_set constant_result = constant_value_not_set
def get_child_attrs(self): try:
return self.subexprs _get_child_attrs = operator.attrgetter('subexprs')
child_attrs = property(fget=get_child_attrs) except AttributeError:
# Python 2.3
def _get_child_attrs(self):
return self.subexprs
child_attrs = property(fget=_get_child_attrs)
def not_implemented(self, method_name): def not_implemented(self, method_name):
print_call_chain(method_name, "not implemented") ### print_call_chain(method_name, "not implemented") ###
......
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