Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f21804a

Browse files
committed
Issue #13685 - Update argparse help message for % sign usage.
1 parent 3e6d71d commit f21804a

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Doc/library/argparse.rst

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1082,6 +1082,9 @@ specifiers include the program name, ``%(prog)s`` and most keyword arguments to
10821082
optional arguments:
10831083
-h, --help show this help message and exit
10841084

1085+
As the help string supports %-formatting, if you want a literal ``%`` to appear
1086+
in the help string, you must escape it as ``%%``.
1087+
10851088
:mod:`argparse` supports silencing the help entry for certain options, by
10861089
setting the ``help`` value to ``argparse.SUPPRESS``::
10871090

0 commit comments

Comments
 (0)