Skip to content

Commit cc66dfc

Browse files
[3.13] gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379) (GH-125538)
(cherry picked from commit c9826c1) Co-authored-by: Savannah Ostrowski <[email protected]>
1 parent a22e11f commit cc66dfc

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

Doc/library/argparse.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1785,7 +1785,8 @@ FileType objects
17851785
Argument groups
17861786
^^^^^^^^^^^^^^^
17871787

1788-
.. method:: ArgumentParser.add_argument_group(title=None, description=None)
1788+
.. method:: ArgumentParser.add_argument_group(title=None, description=None, *, \
1789+
[argument_default], [conflict_handler])
17891790

17901791
By default, :class:`ArgumentParser` groups command-line arguments into
17911792
"positional arguments" and "options" when displaying help
@@ -1830,6 +1831,11 @@ Argument groups
18301831

18311832
--bar BAR bar help
18321833

1834+
The optional, keyword-only parameters argument_default_ and conflict_handler_
1835+
allow for finer-grained control of the behavior of the argument group. These
1836+
parameters have the same meaning as in the :class:`ArgumentParser` constructor,
1837+
but apply specifically to the argument group rather than the entire parser.
1838+
18331839
Note that any arguments not in your user-defined groups will end up back
18341840
in the usual "positional arguments" and "optional arguments" sections.
18351841

0 commit comments

Comments
 (0)