mirror of
https://github.com/python/cpython.git
synced 2025-10-15 19:29:46 +00:00
gh-89819: Add argument_default and conflict_handler to add_argument_group() docs (GH-125379)
This commit is contained in:
parent
bb9604b62a
commit
c9826c11db
1 changed files with 7 additions and 1 deletions
|
@ -1808,7 +1808,8 @@ FileType objects
|
||||||
Argument groups
|
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
|
By default, :class:`ArgumentParser` groups command-line arguments into
|
||||||
"positional arguments" and "options" when displaying help
|
"positional arguments" and "options" when displaying help
|
||||||
|
@ -1853,6 +1854,11 @@ Argument groups
|
||||||
|
|
||||||
--bar BAR bar help
|
--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
|
Note that any arguments not in your user-defined groups will end up back
|
||||||
in the usual "positional arguments" and "optional arguments" sections.
|
in the usual "positional arguments" and "optional arguments" sections.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue