summaryrefslogtreecommitdiffstats
path: root/Doc/library
diff options
context:
space:
mode:
authorSavannah Ostrowski <savannahostrowski@gmail.com>2024-10-15 15:48:28 (GMT)
committerGitHub <noreply@github.com>2024-10-15 15:48:28 (GMT)
commitc9826c11db25e81b1a90c837f84074879f1b1126 (patch)
tree4652ee95f35be7b831fce445f425eb414eb415ee /Doc/library
parentbb9604b62ae7f043594ffea9287f9213067cc7fb (diff)
downloadcpython-c9826c11db25e81b1a90c837f84074879f1b1126.zip
cpython-c9826c11db25e81b1a90c837f84074879f1b1126.tar.gz
cpython-c9826c11db25e81b1a90c837f84074879f1b1126.tar.bz2
gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379)
Diffstat (limited to 'Doc/library')
-rw-r--r--Doc/library/argparse.rst8
1 files changed, 7 insertions, 1 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
index d58c75e..51ab8e2 100644
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -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.