https://github.com/python/cpython/commit/1bad1f22ecf3c6ee4ec58f4e414f77afd000a3e0 commit: 1bad1f22ecf3c6ee4ec58f4e414f77afd000a3e0 branch: main author: Sofia Toro <[email protected]> committer: savannahostrowski <[email protected]> date: 2026-10-21T19:00:04Z summary:
gh-58247: clarify metavar behaviour in ArgumentParser.add_subparsers (#148671) Co-authored-by: Savannah Ostrowski <[email protected]> files: M Doc/library/argparse.rst diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 3a8eab76ca0e2b..602743ddce3f6a 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1771,8 +1771,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, ..} + * metavar_ - placeholder shown in usage and the subparsers' help entry + instead of ``{cmd1, cmd2, ...}``; by default ``None``. + Individual subcommand names are unchanged. Some example usage:: _______________________________________________ Python-checkins mailing list -- [email protected] To unsubscribe send an email to [email protected] https://mail.python.org/mailman3//lists/python-checkins.python.org Member address: [email protected]
