An argparse option parser created with a prefix_chars that did not
include a '-' would happily add -h and --help options, and then throw
an error when it tried to format the help because the - was an invalid
prefix character. This patch makes it use the first character of
prefix_chars as the character for the help options if and only if '-'
is not one of the valid prefix_chars.
Fix by Theodore Turocy, unit tests by Catherine Devlin.
svn+ssh://pythondev@svn.python.org/python/trunk
........
r81492 | steven.bethard | 2010-05-23 20:45:26 -0700 (Sun, 23 May 2010) | 1 line
Fix default value for version help. Approved by Benjamin on python-dev: http://mail.python.org/pipermail/python-dev/2010-May/100231.html
........
svn+ssh://pythondev@svn.python.org/python/trunk
........
r78576 | steven.bethard | 2010-03-02 00:38:09 -0800 (Tue, 02 Mar 2010) | 3 lines
Initial commit of the argparse library, based on argparse 1.1.
Docs still need some updating to make getopt and optparse match the wording promised in the PEP.
There are also probably a number of :class:ArgumentParser etc. links that could be added to the argparse documentation.
........