diff options
author | Berker Peksag <berker.peksag@gmail.com> | 2015-01-20 04:46:49 (GMT) |
---|---|---|
committer | Berker Peksag <berker.peksag@gmail.com> | 2015-01-20 04:46:49 (GMT) |
commit | 7b6b3d771ac81cc8a1897785e275b38002cce7e8 (patch) | |
tree | c43306cbbd06686bf784d969b342d358b5c90596 | |
parent | cb18b95ab8da1f1765e6fd4fbc082078ac55505d (diff) | |
parent | 5a494f6ad850b7d2a4a5007fc27a1a1614a2c2a0 (diff) | |
download | cpython-7b6b3d771ac81cc8a1897785e275b38002cce7e8.zip cpython-7b6b3d771ac81cc8a1897785e275b38002cce7e8.tar.gz cpython-7b6b3d771ac81cc8a1897785e275b38002cce7e8.tar.bz2 |
Issue #22317: Document the action parameter in ArgumentParser.add_subparsers() docs.
Patch by Mike Short.
-rw-r--r-- | Doc/library/argparse.rst | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 4f2febe..8b3d9fc 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1521,12 +1521,15 @@ Sub-commands * parser_class - class which will be used to create sub-parser instances, by 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 - * 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, ..} Some example usage:: |