1. python_mirrors
  2. 2to3

Commits

Benjamin Peterson  committed bd94f96

avoid expensive checks and assume the node did change

  • Participants
  • Parent commits 15b6d5b
  • Branches default

Comments (0)

Files changed (1)

File lib2to3/refactor.py

View file
                 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