[Python-checkins] cpython (3.2): Issue #13685 - Update argparse help message for % sign usage.

senthil.kumaran python-checkins at python.org
Tue Jun 26 08:18:28 CEST 2012


http://hg.python.org/cpython/rev/c696416eb4e9
changeset: 77788:c696416eb4e9
branch: 3.2
parent: 77784:1bc1a14feb70
user: Senthil Kumaran <senthil at uthcode.com>
date: Tue Jun 26 14:17:19 2012 +0800
summary:
 Issue #13685 - Update argparse help message for % sign usage.
files:
 Doc/library/argparse.rst | 3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/Doc/library/argparse.rst b/Doc/library/argparse.rst
--- a/Doc/library/argparse.rst
+++ b/Doc/library/argparse.rst
@@ -1082,6 +1082,9 @@
 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``::
 
-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list

AltStyle によって変換されたページ (->オリジナル) /