bpo-38438: Simplify argparse "star nargs" usage. (GH-17106)

This commit is contained in:
Brandt Bucher 2019-11-11 12:47:48 -08:00 committed by Raymond Hettinger
parent 84ac437658
commit a0ed99bca8
6 changed files with 20 additions and 15 deletions

View file

@ -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])