Commit 7830d4fd authored by Stefan Behnel's avatar Stefan Behnel

and another tiny speed-up

parent 88213614
# #
# Tree visitor and transform framework # Tree visitor and transform framework
# #
import cython
import inspect import inspect
import Nodes import Nodes
import ExprNodes import ExprNodes
...@@ -147,6 +148,7 @@ class VisitorTransform(TreeVisitor): ...@@ -147,6 +148,7 @@ class VisitorTransform(TreeVisitor):
self._super_visitchildren = super(VisitorTransform, self).visitchildren self._super_visitchildren = super(VisitorTransform, self).visitchildren
def visitchildren(self, parent, attrs=None): def visitchildren(self, parent, attrs=None):
result = cython.declare(dict)
result = self._super_visitchildren(parent, attrs) result = self._super_visitchildren(parent, attrs)
for attr, newnode in result.iteritems(): for attr, newnode in result.iteritems():
if not isinstance(newnode, list): if not isinstance(newnode, list):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment