[New-bugs-announce] [issue11708] argparse: suggestion for formatting optional positional args
Peter Williams
report at bugs.python.org
Tue Mar 29 06:21:10 CEST 2011
New submission from Peter Williams <pwil3058 at bigpond.net.au>:
At present, if a number (e.g. 2) of optional positional arguments
are defined (e.g. arg1 and arg2) argparse formats them as follows:
usage: program [arg1] [arg2]
in the usage message. I would like to suggest that a better format would be:
usage: program [arg1 [arg2]]
as this more accurately reflects the way argparse treats them during parsing of the command line.
This formatting would be consistent with the way argparse currently formats a single optional positional argument with nargs='*', namely:
usage: program [arg [arg ...]]
----------
components: Library (Lib)
messages: 132462
nosy: pwil3058
priority: normal
severity: normal
status: open
title: argparse: suggestion for formatting optional positional args
type: feature request
versions: Python 2.7
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11708>
_______________________________________
More information about the New-bugs-announce
mailing list