diff options
Diffstat (limited to 'Lib/lib2to3/fixes/fix_numliterals.py')
| -rw-r--r-- | Lib/lib2to3/fixes/fix_numliterals.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Lib/lib2to3/fixes/fix_numliterals.py b/Lib/lib2to3/fixes/fix_numliterals.py index d821e39..871623b 100644 --- a/Lib/lib2to3/fixes/fix_numliterals.py +++ b/Lib/lib2to3/fixes/fix_numliterals.py @@ -15,13 +15,13 @@ class FixNumliterals(fixer_base.BaseFix): def match(self, node): # Override return (node.type == token.NUMBER and - (node.value.startswith("0") or node.value[-1] in "Ll")) + (node.value.startswith(u"0") or node.value[-1] in u"Ll")) def transform(self, node, results): val = node.value - if val[-1] in 'Ll': + if val[-1] in u'Ll': val = val[:-1] - elif val.startswith('0') and val.isdigit() and len(set(val)) > 1: - val = "0o" + val[1:] + elif val.startswith(u'0') and val.isdigit() and len(set(val)) > 1: + val = u"0o" + val[1:] return Number(val, prefix=node.get_prefix()) |
