Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit c9826c1

Browse filesBrowse files
gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379)
1 parent bb9604b commit c9826c1
Copy full SHA for c9826c1

File tree

Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+7
-1
lines changed

‎Doc/library/argparse.rst

Copy file name to clipboardExpand all lines: Doc/library/argparse.rst
+7-1Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1808,7 +1808,8 @@ FileType objects
18081808
Argument groups
18091809
^^^^^^^^^^^^^^^
18101810

1811-
.. method:: ArgumentParser.add_argument_group(title=None, description=None)
1811+
.. method:: ArgumentParser.add_argument_group(title=None, description=None, *, \
1812+
[argument_default], [conflict_handler])
18121813

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

18541855
--bar BAR bar help
18551856

1857+
The optional, keyword-only parameters argument_default_ and conflict_handler_
1858+
allow for finer-grained control of the behavior of the argument group. These
1859+
parameters have the same meaning as in the :class:`ArgumentParser` constructor,
1860+
but apply specifically to the argument group rather than the entire parser.
1861+
18561862
Note that any arguments not in your user-defined groups will end up back
18571863
in the usual "positional arguments" and "optional arguments" sections.
18581864

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.