[Python-checkins] r54770 - sandbox/trunk/2to3/fixes/fix_raw_input.py
collin.winter
python-checkins at python.org
Thu Apr 12 05:30:27 CEST 2007
Author: collin.winter
Date: Thu Apr 12 05:30:26 2007
New Revision: 54770
Modified:
sandbox/trunk/2to3/fixes/fix_raw_input.py
Log:
Reindent, reformat for readability. Also, remove an unneeded import.
Modified: sandbox/trunk/2to3/fixes/fix_raw_input.py
==============================================================================
--- sandbox/trunk/2to3/fixes/fix_raw_input.py (original)
+++ sandbox/trunk/2to3/fixes/fix_raw_input.py Thu Apr 12 05:30:26 2007
@@ -3,23 +3,19 @@
# Local imports
import pytree
-from pgen2 import token
from fixes import basefix
from fixes.util import Name
class FixRawInput(basefix.BaseFix):
PATTERN = """
- power<
- 'raw_input'
- args=trailer< '(' [any] ')' >
- >
- """
+ power< 'raw_input' args=trailer< '(' [any] ')' > >
+ """
def transform(self, node):
results = self.match(node)
args = results["args"]
- new = pytree.Node(self.syms.power,
- [Name("input"), args.clone()])
+
+ new = pytree.Node(self.syms.power, [Name("input"), args.clone()])
new.set_prefix(node.get_prefix())
return new
More information about the Python-checkins
mailing list