diff options
-rw-r--r-- | Lib/compiler/visitor.py | 6 | ||||
-rw-r--r-- | Tools/compiler/compiler/visitor.py | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/Lib/compiler/visitor.py b/Lib/compiler/visitor.py index a6604f4..dfeda32 100644 --- a/Lib/compiler/visitor.py +++ b/Lib/compiler/visitor.py @@ -61,13 +61,13 @@ class ASTVisitor: print "dispatch", className else: print "dispatch", className, (meth and meth.__name__ or '') - return apply(meth, (node,) + args) + return meth(node, *args) - def preorder(self, tree, visitor): + def preorder(self, tree, visitor, *args): """Do preorder walk of tree using visitor""" self.visitor = visitor visitor.visit = self._preorder - self._preorder(tree) + self._preorder(tree, *args) # XXX *args make sense? _preorder = dispatch diff --git a/Tools/compiler/compiler/visitor.py b/Tools/compiler/compiler/visitor.py index a6604f4..dfeda32 100644 --- a/Tools/compiler/compiler/visitor.py +++ b/Tools/compiler/compiler/visitor.py @@ -61,13 +61,13 @@ class ASTVisitor: print "dispatch", className else: print "dispatch", className, (meth and meth.__name__ or '') - return apply(meth, (node,) + args) + return meth(node, *args) - def preorder(self, tree, visitor): + def preorder(self, tree, visitor, *args): """Do preorder walk of tree using visitor""" self.visitor = visitor visitor.visit = self._preorder - self._preorder(tree) + self._preorder(tree, *args) # XXX *args make sense? _preorder = dispatch |