Commit fe021417 authored by Berker Peksag's avatar Berker Peksag

Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs.

Patch by Mike Short.
parent b99eb1b1
...@@ -1499,12 +1499,15 @@ Sub-commands ...@@ -1499,12 +1499,15 @@ Sub-commands
* parser_class - class which will be used to create sub-parser instances, by * parser_class - class which will be used to create sub-parser instances, by
default the class of the current parser (e.g. ArgumentParser) default the class of the current parser (e.g. ArgumentParser)
* dest - name of the attribute under which sub-command name will be * action_ - the basic type of action to be taken when this argument is
encountered at the command line
* dest_ - name of the attribute under which sub-command name will be
stored; by default None and no value is stored stored; by default None and no value is stored
* help - help for sub-parser group in help output, by default None * help_ - help for sub-parser group in help output, by default None
* metavar - string presenting available sub-commands in help; by default it * metavar_ - string presenting available sub-commands in help; by default it
is None and presents sub-commands in form {cmd1, cmd2, ..} is None and presents sub-commands in form {cmd1, cmd2, ..}
Some example usage:: Some example usage::
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment