This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author pwil3058
Recipients pwil3058
Date 2011-03-29.04:21:09
SpamBayes Score 5.343739e-08
Marked as misclassified No
Message-id <1301372470.63.0.394832292121.issue11708@psf.upfronthosting.co.za>
In-reply-to
Content
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 ...]]
History
Date User Action Args
2011-03-29 04:21:10pwil3058setrecipients: + pwil3058
2011-03-29 04:21:10pwil3058setmessageid: <1301372470.63.0.394832292121.issue11708@psf.upfronthosting.co.za>
2011-03-29 04:21:10pwil3058linkissue11708 messages
2011-03-29 04:21:09pwil3058create