aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Lib/lib2to3/fixes/fix_numliterals.py
diff options
context:
space:
mode:
authorBenjamin Peterson <benjamin@python.org>2009-07-21 12:55:57 +0000
committerBenjamin Peterson <benjamin@python.org>2009-07-21 12:55:57 +0000
commitdd6a4edc4554cdb808f08a9ade7e40ed5addc94d (patch)
treeaccdbab3c1fe2e088a6437d5598bc921f22c10b0 /Lib/lib2to3/fixes/fix_numliterals.py
parentafcd5f36f00d3a368004c574642175f623ce8ad4 (diff)
downloadcpython-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.py5
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