summaryrefslogtreecommitdiffstats
path: root/Lib/lib2to3/fixes/fix_xrange.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/lib2to3/fixes/fix_xrange.py')
-rw-r--r--Lib/lib2to3/fixes/fix_xrange.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/Lib/lib2to3/fixes/fix_xrange.py b/Lib/lib2to3/fixes/fix_xrange.py
index ca8f21a..c472a03 100644
--- a/Lib/lib2to3/fixes/fix_xrange.py
+++ b/Lib/lib2to3/fixes/fix_xrange.py
@@ -19,22 +19,22 @@ class FixXrange(fixer_base.BaseFix):
def transform(self, node, results):
name = results["name"]
- if name.value == "xrange":
+ if name.value == u"xrange":
return self.transform_xrange(node, results)
- elif name.value == "range":
+ elif name.value == u"range":
return self.transform_range(node, results)
else:
raise ValueError(repr(name))
def transform_xrange(self, node, results):
name = results["name"]
- name.replace(Name("range", prefix=name.get_prefix()))
+ name.replace(Name(u"range", prefix=name.get_prefix()))
def transform_range(self, node, results):
if not self.in_special_context(node):
- range_call = Call(Name("range"), [results["args"].clone()])
+ range_call = Call(Name(u"range"), [results["args"].clone()])
# Encase the range call in list().
- list_call = Call(Name("list"), [range_call],
+ list_call = Call(Name(u"list"), [range_call],
prefix=node.get_prefix())
# Put things that were after the range() call after the list call.
for n in results["rest"]: