From 533a07e35053cd45ae17ee1c18332d6ec3523c49 Mon Sep 17 00:00:00 2001 From: Serhiy Storchaka Date: Wed, 6 Nov 2024 12:11:40 +0200 Subject: [PATCH] Update Doc/library/argparse.rst Co-authored-by: Savannah Ostrowski --- Doc/library/argparse.rst | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 18957c62ccc2ba..e6d94ad8bdbd5f 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -192,10 +192,12 @@ arguments it contains. The default message can be overridden with the The ``%(prog)s`` format specifier is available to fill in the program name in your usage messages. -When a custom usage message is specified for the main parser, consider -also passing the ``prog`` argument to :meth:`~ArgumentParser.add_subparsers` +When a custom usage message is specified for the main parser, you may also want to +consider passing the ``prog`` argument to :meth:`~ArgumentParser.add_subparsers` or the ``prog`` and the ``usage`` arguments to -:meth:`~_SubParsersAction.add_parser`. +:meth:`~_SubParsersAction.add_parser`, to ensure consistent command prefixes and +usage information across subparsers. +`` .. _description: