Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7b6b3d7

Browse files
committed
Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs.
Patch by Mike Short.
2 parents cb18b95 + 5a494f6 commit 7b6b3d7

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

Doc/library/argparse.rst

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1521,12 +1521,15 @@ Sub-commands
15211521
* parser_class - class which will be used to create sub-parser instances, by
15221522
default the class of the current parser (e.g. ArgumentParser)
15231523

1524-
* dest - name of the attribute under which sub-command name will be
1524+
* action_ - the basic type of action to be taken when this argument is
1525+
encountered at the command line
1526+
1527+
* dest_ - name of the attribute under which sub-command name will be
15251528
stored; by default None and no value is stored
15261529

1527-
* help - help for sub-parser group in help output, by default None
1530+
* help_ - help for sub-parser group in help output, by default None
15281531

1529-
* metavar - string presenting available sub-commands in help; by default it
1532+
* metavar_ - string presenting available sub-commands in help; by default it
15301533
is None and presents sub-commands in form {cmd1, cmd2, ..}
15311534

15321535
Some example usage::

0 commit comments

Comments
 (0)