summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3
diff options
context:
space:
mode:
authorMartin v. Löwis <martin@v.loewis.de>2008-03-22 01:20:40 (GMT)
committerMartin v. Löwis <martin@v.loewis.de>2008-03-22 01:20:40 (GMT)
commita0272aa6e94256829b038ac8e50231c1873321f1 (patch)
tree3bf6bad3014cfc83eb81caf3637672b1a5002bf2 /Lib/lib2to3
parent4fbc72b4ac7ac32d85f1fe8d465ed4c8736d002d (diff)
downloadcpython-a0272aa6e94256829b038ac8e50231c1873321f1.zip
cpython-a0272aa6e94256829b038ac8e50231c1873321f1.tar.gz
cpython-a0272aa6e94256829b038ac8e50231c1873321f1.tar.bz2
unicode->str.
Diffstat (limited to 'Lib/lib2to3')
-rw-r--r--Lib/lib2to3/fixes/fix_import.py4
-rw-r--r--Lib/lib2to3/fixes/fix_itertools_imports.py2
2 files changed, 3 insertions, 3 deletions
diff --git a/Lib/lib2to3/fixes/fix_import.py b/Lib/lib2to3/fixes/fix_import.py
index 6617054..52e8408 100644
--- a/Lib/lib2to3/fixes/fix_import.py
+++ b/Lib/lib2to3/fixes/fix_import.py
@@ -25,11 +25,11 @@ class FixImport(basefix.BaseFix):
def transform(self, node, results):
imp = results['imp']
- if unicode(imp).startswith('.'):
+ if str(imp).startswith('.'):
# Already a new-style import
return
- if not probably_a_local_import(unicode(imp), self.filename):
+ if not probably_a_local_import(str(imp), self.filename):
# I guess this is a global import -- skip it!
return
diff --git a/Lib/lib2to3/fixes/fix_itertools_imports.py b/Lib/lib2to3/fixes/fix_itertools_imports.py
index 0faa4ea..7adf643 100644
--- a/Lib/lib2to3/fixes/fix_itertools_imports.py
+++ b/Lib/lib2to3/fixes/fix_itertools_imports.py
@@ -31,7 +31,7 @@ class FixItertoolsImports(basefix.BaseFix):
else:
remove_comma ^= True
- if unicode(children[-1]) == ',':
+ if str(children[-1]) == ',':
children[-1].remove()
# If there is nothing left, return a blank line