File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -705,6 +705,19 @@ how the command-line arguments should be handled. The supported actions are:
705705 >>> parser.parse_args('--str --int'.split())
706706 Namespace(types=[<class 'str'>, <class 'int'>])
707707
708+ * ``'count' `` - This counts the number of times a keyword argument occurs. For
709+ example, this is useful for increasing verbosity levels::
710+
711+ >>> parser = argparse.ArgumentParser()
712+ >>> parser.add_argument('--verbose', '-v', action='count')
713+ >>> parser.parse_args('-vvv'.split())
714+ Namespace(verbose=3)
715+
716+ * ``'help' `` - This prints a complete help message for all the options in the
717+ current parser and then exits. By default a help action is automatically
718+ added to the parser. See :class: `ArgumentParser ` for details of how the
719+ output is created.
720+
708721* ``'version' `` - This expects a ``version= `` keyword argument in the
709722 :meth: `~ArgumentParser.add_argument ` call, and prints version information
710723 and exits when invoked.
You can’t perform that action at this time.
0 commit comments