[issue9849] Argparse needs better error handling for nargs
paul j3
report at bugs.python.org
Sun Jun 8 08:05:34 CEST 2014
paul j3 added the comment:
http://bugs.python.org/issue21666
raises the possibility of testing the 'help' parameter in the same way. By adding (to _check_argument):
# check the 'help' string
try:
self._get_formatter()._expand_help(action)
except (ValueError, TypeError, KeyError) as e:
raise ArgumentError(action, 'badly formed help string')
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9849>
_______________________________________
More information about the Python-bugs-list
mailing list