mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Change default() to use getChildNodes() instead of getChildren()
This commit is contained in:
parent
94afe32b5e
commit
5a9ac97040
2 changed files with 4 additions and 6 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue