[Python-checkins] r67991 - sandbox/trunk/2to3/lib2to3/refactor.py

benjamin.peterson python-checkins at python.org
Sun Dec 28 21:30:26 CET 2008


Author: benjamin.peterson
Date: Sun Dec 28 21:30:26 2008
New Revision: 67991

Log:
actually call finish_tree()

Modified:
   sandbox/trunk/2to3/lib2to3/refactor.py

Modified: sandbox/trunk/2to3/lib2to3/refactor.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/refactor.py	(original)
+++ sandbox/trunk/2to3/lib2to3/refactor.py	Sun Dec 28 21:30:26 2008
@@ -287,17 +287,13 @@
         Returns:
             True if the tree was modified, False otherwise.
         """
-        # Two calls to chain are required because pre_order.values()
-        #   will be a list of lists of fixers:
-        #   [[<fixer ...>, <fixer ...>], [<fixer ...>]]
-        all_fixers = chain(self.pre_order, self.post_order)
-        for fixer in all_fixers:
+        for fixer in chain(self.pre_order, self.post_order):
             fixer.start_tree(tree, name)
 
         self.traverse_by(self.pre_order_heads, tree.pre_order())
         self.traverse_by(self.post_order_heads, tree.post_order())
 
-        for fixer in all_fixers:
+        for fixer in chain(self.pre_order, self.post_order):
             fixer.finish_tree(tree, name)
         return tree.was_changed
 


More information about the Python-checkins mailing list