[issue10424] better error message from argparse when positionals missing

Michele Orrù report at bugs.python.org
Fri Nov 19 23:03:42 CET 2010


Michele Orrù <maker.py at gmail.com> added the comment:

This issue seems already fixed.

File: Lib/argparse.py
922         # if we didn't use all the Positional objects, there were too few
1923         # arg strings supplied.
1924         if positionals:
1925             self.error(_('too few arguments'))
1926 
1927         # make sure all required actions were present
1928         for action in self._actions:
1929             if action.required:
1930                 if action not in seen_actions:
1931                     name = _get_action_name(action)
1932                     self.error(_('argument %s is required') % name)

----------
nosy: +ezio.melotti, maker

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10424>
_______________________________________


More information about the Python-bugs-list mailing list