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

benjamin.peterson python-checkins at python.org
Sun Jul 12 00:34:44 CEST 2009


Author: benjamin.peterson
Date: Sun Jul 12 00:34:44 2009
New Revision: 73967

Log:
avoid expensive checks and assume the node did change

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 Jul 12 00:34:44 2009
@@ -343,8 +343,7 @@
                 results = fixer.match(node)
                 if results:
                     new = fixer.transform(node, results)
-                    if new is not None and (new != node or
-                                            unicode(new) != unicode(node)):
+                    if new is not None:
                         node.replace(new)
                         node = new
 


More information about the Python-checkins mailing list