mirror of https://github.com/python/cpython.git
Change default() to use getChildNodes() instead of getChildren()
This commit is contained in:
parent
94afe32b5e
commit
5a9ac97040
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue