diff options
author | Benjamin Peterson <benjamin@python.org> | 2009-07-21 12:55:57 +0000 |
---|---|---|
committer | Benjamin Peterson <benjamin@python.org> | 2009-07-21 12:55:57 +0000 |
commit | dd6a4edc4554cdb808f08a9ade7e40ed5addc94d (patch) | |
tree | accdbab3c1fe2e088a6437d5598bc921f22c10b0 /Lib/lib2to3/fixes/fix_numliterals.py | |
parent | afcd5f36f00d3a368004c574642175f623ce8ad4 (diff) | |
download | cpython-dd6a4edc4554cdb808f08a9ade7e40ed5addc94d.tar.gz cpython-dd6a4edc4554cdb808f08a9ade7e40ed5addc94d.zip |
merge 2to3 improvments
Diffstat (limited to 'Lib/lib2to3/fixes/fix_numliterals.py')
-rw-r--r-- | Lib/lib2to3/fixes/fix_numliterals.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/lib2to3/fixes/fix_numliterals.py b/Lib/lib2to3/fixes/fix_numliterals.py index 6552740d5af..79207d4aa36 100644 --- a/Lib/lib2to3/fixes/fix_numliterals.py +++ b/Lib/lib2to3/fixes/fix_numliterals.py @@ -12,10 +12,11 @@ from ..fixer_util import Number class FixNumliterals(fixer_base.BaseFix): # This is so simple that we don't need the pattern compiler. + _accept_type = token.NUMBER + def match(self, node): # Override - return (node.type == token.NUMBER and - (node.value.startswith("0") or node.value[-1] in "Ll")) + return (node.value.startswith("0") or node.value[-1] in "Ll") def transform(self, node, results): val = node.value |