Skip to content

Commit

Permalink
gh-89819: Add argument_default and conflict_handler to add_argument_g…
Browse files Browse the repository at this point in the history
…roup() docs (GH-125379)
  • Loading branch information
savannahostrowski authored Oct 15, 2024
1 parent bb9604b commit c9826c1
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion Doc/library/argparse.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1808,7 +1808,8 @@ FileType objects
Argument groups
^^^^^^^^^^^^^^^

.. method:: ArgumentParser.add_argument_group(title=None, description=None)
.. method:: ArgumentParser.add_argument_group(title=None, description=None, *, \
[argument_default], [conflict_handler])

By default, :class:`ArgumentParser` groups command-line arguments into
"positional arguments" and "options" when displaying help
Expand Down Expand Up @@ -1853,6 +1854,11 @@ Argument groups

--bar BAR bar help

The optional, keyword-only parameters argument_default_ and conflict_handler_
allow for finer-grained control of the behavior of the argument group. These
parameters have the same meaning as in the :class:`ArgumentParser` constructor,
but apply specifically to the argument group rather than the entire parser.

Note that any arguments not in your user-defined groups will end up back
in the usual "positional arguments" and "optional arguments" sections.

Expand Down

0 comments on commit c9826c1

Please sign in to comment.