[Python-checkins] r73965 - in sandbox/trunk/2to3/lib2to3: fixes/fix_operator.py refactor.py

benjamin.peterson python-checkins at python.org
Sun Jul 12 00:31:30 CEST 2009


Author: benjamin.peterson
Date: Sun Jul 12 00:31:30 2009
New Revision: 73965
Log:
remove usage of get_prefix()
Modified:
 sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py
 sandbox/trunk/2to3/lib2to3/refactor.py
Modified: sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py	(original)
+++ sandbox/trunk/2to3/lib2to3/fixes/fix_operator.py	Sun Jul 12 00:31:30 2009
@@ -37,4 +37,4 @@
 else:
 func = results["func"]
 args = [func.clone(), String(u", "), String(u"'__call__'")]
- return Call(Name(u"hasattr"), args, prefix=node.get_prefix())
+ return Call(Name(u"hasattr"), args, prefix=node.prefix)
Modified: sandbox/trunk/2to3/lib2to3/refactor.py
==============================================================================
--- sandbox/trunk/2to3/lib2to3/refactor.py	(original)
+++ sandbox/trunk/2to3/lib2to3/refactor.py	Sun Jul 12 00:31:30 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

AltStyle によって変換されたページ (->オリジナル) /