]> granicus.if.org Git - python/commitdiff
Change default() to use getChildNodes() instead of getChildren()
authorJeremy Hylton <jeremy@alum.mit.edu>
Wed, 29 Aug 2001 18:17:22 +0000 (18:17 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Wed, 29 Aug 2001 18:17:22 +0000 (18:17 +0000)
Lib/compiler/visitor.py
Tools/compiler/compiler/visitor.py

index 3f2ae668e20fd17854d288b81853b7f2c236eec2..0560619c849dc8ffcf32e0b7f1e13d5e3aca7147 100644 (file)
@@ -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
index 3f2ae668e20fd17854d288b81853b7f2c236eec2..0560619c849dc8ffcf32e0b7f1e13d5e3aca7147 100644 (file)
@@ -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