]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-89819: Add argument_default and conflict_handler to add_argument_group() docs...
authorSavannah Ostrowski <savannahostrowski@gmail.com>
Tue, 15 Oct 2024 15:48:28 +0000 (08:48 -0700)
committerGitHub <noreply@github.com>
Tue, 15 Oct 2024 15:48:28 +0000 (15:48 +0000)
Doc/library/argparse.rst

index d58c75eef3e739d415c9b7fbea4340537afa466a..51ab8e29ff96d52d19867dc31cf7d1e4a6423852 100644 (file)
@@ -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
@@ -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.