summaryrefslogtreecommitdiffstats
path: root/Lib/optparse.py
diff options
context:
space:
mode:
authorFlorent Xicluna <florent.xicluna@gmail.com>2011-10-23 20:11:00 (GMT)
committerFlorent Xicluna <florent.xicluna@gmail.com>2011-10-23 20:11:00 (GMT)
commit2bb96f593a067dafc7f02fef659ff22994b83399 (patch)
treeb2b2acc64f5e4e6da3d98541544c72b2a439e98a /Lib/optparse.py
parent8d48b43ea9abe494527acea05dcd6b8d067278ea (diff)
downloadcpython-2bb96f593a067dafc7f02fef659ff22994b83399.zip
cpython-2bb96f593a067dafc7f02fef659ff22994b83399.tar.gz
cpython-2bb96f593a067dafc7f02fef659ff22994b83399.tar.bz2
Cleanup code: remove int/long idioms and simplify a while statement.
Diffstat (limited to 'Lib/optparse.py')
-rw-r--r--Lib/optparse.py5
1 files changed, 1 insertions, 4 deletions
diff --git a/Lib/optparse.py b/Lib/optparse.py
index b09a13c..946b6a5 100644
--- a/Lib/optparse.py
+++ b/Lib/optparse.py
@@ -417,11 +417,8 @@ def _parse_num(val, type):
def _parse_int(val):
return _parse_num(val, int)
-def _parse_long(val):
- return _parse_num(val, int)
-
_builtin_cvt = { "int" : (_parse_int, _("integer")),
- "long" : (_parse_long, _("long integer")),
+ "long" : (_parse_int, _("integer")),
"float" : (float, _("floating-point")),
"complex" : (complex, _("complex")) }