From: Jeremy Hylton Date: Wed, 29 Aug 2001 18:17:22 +0000 (+0000) Subject: Change default() to use getChildNodes() instead of getChildren() X-Git-Tag: v2.2a3~250 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5a9ac9704094f13c5bdfc67080a58279699d8e47;p=thirdparty%2FPython%2Fcpython.git Change default() to use getChildNodes() instead of getChildren() --- diff --git a/Lib/compiler/visitor.py b/Lib/compiler/visitor.py index 3f2ae668e20f..0560619c849d 100644 --- a/Lib/compiler/visitor.py +++ b/Lib/compiler/visitor.py @@ -44,9 +44,8 @@ class ASTVisitor: 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 3f2ae668e20f..0560619c849d 100644 --- a/Tools/compiler/compiler/visitor.py +++ b/Tools/compiler/compiler/visitor.py @@ -44,9 +44,8 @@ class ASTVisitor: 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