Skip to content

Commit 459338b

Browse files
committed
clarify metavar behaviour in ArgumentParser.add_subparsers
1 parent 74a82a2 commit 459338b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Doc/library/argparse.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1742,7 +1742,9 @@ Subcommands
17421742
* help_ - help for sub-parser group in help output, by default ``None``
17431743

17441744
* metavar_ - string presenting available subcommands in help; by default it
1745-
is ``None`` and presents subcommands in form {cmd1, cmd2, ..}
1745+
is ``None`` and presents subcommands in form {cmd1, cmd2, ..} in the usage line
1746+
and next to the subparsers group heading. It does not change how the
1747+
individual subcommands are listed below that heading
17461748

17471749
Some example usage::
17481750

0 commit comments

Comments
 (0)