Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
clarify metavar behaviour in ArgumentParser.add_subparsers
  • Loading branch information
SofieTorch committed Apr 17, 2026
commit 459338b7d1ed586b31be90b25d67f4e360d4d4d6
4 changes: 3 additions & 1 deletion Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1742,7 +1742,9 @@ Subcommands
* help_ - help for sub-parser group in help output, by default ``None``

* metavar_ - string presenting available subcommands in help; by default it
is ``None`` and presents subcommands in form {cmd1, cmd2, ..}
is ``None`` and presents subcommands in form {cmd1, cmd2, ..} in the usage line
and next to the subparsers group heading. It does not change how the
individual subcommands are listed below that heading
Comment thread
savannahostrowski marked this conversation as resolved.
Outdated

Some example usage::

Expand Down
Loading