diff options
author | Sandro Tosi <sandro.tosi@gmail.com> | 2012-01-03 17:37:46 (GMT) |
---|---|---|
committer | Sandro Tosi <sandro.tosi@gmail.com> | 2012-01-03 17:37:46 (GMT) |
commit | 5c91242f881f4496034c4b452d5fcc74f66206c8 (patch) | |
tree | 80e3a6b3c05502a3f48155563e559a42528bc0f4 /Doc/library/argparse.rst | |
parent | 74c503b40d9c40b1a5e7874188f36e067b14356c (diff) | |
parent | ea320abcae63cadfbc5f57122822acff2bc27dd5 (diff) | |
download | cpython-5c91242f881f4496034c4b452d5fcc74f66206c8.zip cpython-5c91242f881f4496034c4b452d5fcc74f66206c8.tar.gz cpython-5c91242f881f4496034c4b452d5fcc74f66206c8.tar.bz2 |
merge with 3.2
Diffstat (limited to 'Doc/library/argparse.rst')
-rw-r--r-- | Doc/library/argparse.rst | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 0d6925d..c280704 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1070,6 +1070,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 ^^^^^^^ |