cpython/Lib/lib2to3/fixes/fix_basestring.py

14 lines
287 B
Python
Raw Normal View History

2008-03-19 01:43:46 -03:00
"""Fixer for basestring -> str."""
# Author: Christian Heimes
# Local imports
from . import basefix
from .util import Name
class FixBasestring(basefix.BaseFix):
PATTERN = "'basestring'"
def transform(self, node, results):
return Name("str", prefix=node.get_prefix())