[issue9694] argparse: Default Help Message Lists Required Args As Optional
Eric Smith
report at bugs.python.org
Fri Aug 27 02:14:39 CEST 2010
Eric Smith <eric at trueblade.com> added the comment:
If you add a positional parameter by adding:
parser.add_argument('foo')
then the output becomes:
$ python argparse-help-says-required-args-are-optional.py -h
usage: issue9649.py [-h] --reqarg REQARG [--optarg OPTARG] foo
Do something
positional arguments:
foo
optional arguments:
-h, --help show this help message and exit
--reqarg REQARG, -r REQARG
This is required
--optarg OPTARG, -o OPTARG
This is optional
$
So whatever replaces "optional arguments:" needs to read well with "positional arguments:". Maybe just plain "options:" is good enough, but I think a word to replace "optional" (leaving "arguments:") would be better. I just don't have any useful suggestion :)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue9694>
_______________________________________
More information about the Python-bugs-list
mailing list