Change default() to use getChildNodes() instead of getChildren()

This commit is contained in:
Jeremy Hylton 2001-08-29 18:17:22 +00:00
parent 94afe32b5e
commit 5a9ac97040
2 changed files with 4 additions and 6 deletions

View File

@ -44,9 +44,8 @@ def __init__(self):
self._cache = {}
def default(self, node, *args):
for child in node.getChildren():
if isinstance(child, ast.Node):
self.dispatch(child, *args)
for child in node.getChildNodes():
self.dispatch(child, *args)
def dispatch(self, node, *args):
self.node = node

View File

@ -44,9 +44,8 @@ def __init__(self):
self._cache = {}
def default(self, node, *args):
for child in node.getChildren():
if isinstance(child, ast.Node):
self.dispatch(child, *args)
for child in node.getChildNodes():
self.dispatch(child, *args)
def dispatch(self, node, *args):
self.node = node