Skip to content

Commit

Permalink
Update Doc/library/argparse.rst
Browse files Browse the repository at this point in the history
Co-authored-by: Savannah Ostrowski <[email protected]>
  • Loading branch information
serhiy-storchaka and savannahostrowski authored Nov 6, 2024
1 parent a3fba3f commit 533a07e
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 533a07e

Please sign in to comment.