Import lib2to3.

This commit is contained in:
Martin v. Löwis 2008-03-19 04:43:46 +00:00
parent a4d77898db
commit 5e37baea80
68 changed files with 11993 additions and 0 deletions

View file

@ -0,0 +1,16 @@
"""Fixer that changes raw_input(...) into input(...)."""
# Author: Andre Roberge
# Local imports
from .import basefix
from .util import Name
class FixRawInput(basefix.BaseFix):
PATTERN = """
power< name='raw_input' trailer< '(' [any] ')' > >
"""
def transform(self, node, results):
name = results["name"]
name.replace(Name("input", prefix=name.get_prefix()))