Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit a0272aa

Browse files
committed
unicode->str.
1 parent 4fbc72b commit a0272aa

2 files changed

Lines changed: 3 additions & 3 deletions

File tree

Lib/lib2to3/fixes/fix_import.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,11 +25,11 @@ class FixImport(basefix.BaseFix):
2525
def transform(self, node, results):
2626
imp = results['imp']
2727

28-
if unicode(imp).startswith('.'):
28+
if str(imp).startswith('.'):
2929
# Already a new-style import
3030
return
3131

32-
if not probably_a_local_import(unicode(imp), self.filename):
32+
if not probably_a_local_import(str(imp), self.filename):
3333
# I guess this is a global import -- skip it!
3434
return
3535

Lib/lib2to3/fixes/fix_itertools_imports.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ def transform(self, node, results):
3131
else:
3232
remove_comma ^= True
3333

34-
if unicode(children[-1]) == ',':
34+
if str(children[-1]) == ',':
3535
children[-1].remove()
3636

3737
# If there is nothing left, return a blank line

0 commit comments

Comments
 (0)