From 459338b7d1ed586b31be90b25d67f4e360d4d4d6 Mon Sep 17 00:00:00 2001 From: Sofia Toro Date: Fri, 17 Apr 2026 10:23:37 +0200 Subject: [PATCH] clarify metavar behaviour in ArgumentParser.add_subparsers --- Doc/library/argparse.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 5a463ee9821d61..6992c105e9dc8d 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -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 Some example usage::