From 5a9ac9704094f13c5bdfc67080a58279699d8e47 Mon Sep 17 00:00:00 2001 From: Jeremy Hylton Date: Wed, 29 Aug 2001 18:17:22 +0000 Subject: [PATCH] Change default() to use getChildNodes() instead of getChildren() --- Lib/compiler/visitor.py | 5 ++--- Tools/compiler/compiler/visitor.py | 5 ++--- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/Lib/compiler/visitor.py b/Lib/compiler/visitor.py index 3f2ae668e20..0560619c849 100644 --- a/Lib/compiler/visitor.py +++ b/Lib/compiler/visitor.py @@ -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 diff --git a/Tools/compiler/compiler/visitor.py b/Tools/compiler/compiler/visitor.py index 3f2ae668e20..0560619c849 100644 --- a/Tools/compiler/compiler/visitor.py +++ b/Tools/compiler/compiler/visitor.py @@ -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