mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-38438: Simplify argparse "star nargs" usage. (GH-17106)
This commit is contained in:
parent
84ac437658
commit
a0ed99bca8
6 changed files with 20 additions and 15 deletions
|
@ -449,7 +449,7 @@ default values to each of the argument help messages::
|
|||
>>> parser.add_argument('--foo', type=int, default=42, help='FOO!')
|
||||
>>> parser.add_argument('bar', nargs='*', default=[1, 2, 3], help='BAR!')
|
||||
>>> parser.print_help()
|
||||
usage: PROG [-h] [--foo FOO] [bar [bar ...]]
|
||||
usage: PROG [-h] [--foo FOO] [bar ...]
|
||||
|
||||
positional arguments:
|
||||
bar BAR! (default: [1, 2, 3])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue