[Python-3000-checkins] r61729 - python/branches/py3k/Lib/lib2to3/fixes/fix_import.py python/branches/py3k/Lib/lib2to3/fixes/fix_itertools_imports.py
martin.v.loewis
python-3000-checkins at python.org
Sat Mar 22 02:20:40 CET 2008
Author: martin.v.loewis
Date: Sat Mar 22 02:20:40 2008
New Revision: 61729
Modified:
python/branches/py3k/Lib/lib2to3/fixes/fix_import.py
python/branches/py3k/Lib/lib2to3/fixes/fix_itertools_imports.py
Log:
unicode->str.
Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_import.py
==============================================================================
--- python/branches/py3k/Lib/lib2to3/fixes/fix_import.py (original)
+++ python/branches/py3k/Lib/lib2to3/fixes/fix_import.py Sat Mar 22 02:20:40 2008
@@ -25,11 +25,11 @@
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
Modified: python/branches/py3k/Lib/lib2to3/fixes/fix_itertools_imports.py
==============================================================================
--- python/branches/py3k/Lib/lib2to3/fixes/fix_itertools_imports.py (original)
+++ python/branches/py3k/Lib/lib2to3/fixes/fix_itertools_imports.py Sat Mar 22 02:20:40 2008
@@ -31,7 +31,7 @@
else:
remove_comma ^= True
- if unicode(children[-1]) == ',':
+ if str(children[-1]) == ',':
children[-1].remove()
# If there is nothing left, return a blank line
More information about the Python-3000-checkins
mailing list