New submission from Peter Williams <pwil3...@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 <rep...@bugs.python.org>
<http://bugs.python.org/issue11708>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to