From: Senthil Kumaran Date: Tue, 26 Jun 2012 06:17:19 +0000 (+0800) Subject: Issue #13685 - Update argparse help message for % sign usage. X-Git-Tag: v3.3.0b1~4^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f21804ad61af980cd6659ca8471b111675b9d20c;p=python Issue #13685 - Update argparse help message for % sign usage. --- diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst index 186e12da31..d64f8a2875 100644 --- a/Doc/library/argparse.rst +++ b/Doc/library/argparse.rst @@ -1082,6 +1082,9 @@ specifiers include the program name, ``%(prog)s`` and most keyword arguments to optional arguments: -h, --help show this help message and exit +As the help string supports %-formatting, if you want a literal ``%`` to appear +in the help string, you must escape it as ``%%``. + :mod:`argparse` supports silencing the help entry for certain options, by setting the ``help`` value to ``argparse.SUPPRESS``::