Commit ea320abc authored by Sandro Tosi's avatar Sandro Tosi

Issue #9349: add argparse.SUPPRESS to help doc

parent 366999a0
......@@ -1051,6 +1051,17 @@ specifiers include the program name, ``%(prog)s`` and most keyword arguments to
optional arguments:
-h, --help show this help message and exit
:mod:`argparse` supports silencing the help entry for certain options, by
setting the ``help`` value to ``argparse.SUPPRESS``::
>>> parser = argparse.ArgumentParser(prog='frobble')
>>> parser.add_argument('--foo', help=argparse.SUPPRESS)
>>> parser.print_help()
usage: frobble [-h]
optional arguments:
-h, --help show this help message and exit
metavar
^^^^^^^
......
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