• R. David Murray's avatar
    #9444: use first of prefix_chars for help opt instead of raising error · 88c49fe3
    R. David Murray yazdı
    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.
    88c49fe3
test_argparse.py 135 KB