samwyse <samw...@gmail.com> added the comment:

One change and one minor problem with my suggestion.

First, you don't need the second alias, since it's a prefix of the argument 
name.  Also, HelpFormatter._format_actions_usage ends with a bit of code 
labeled "clean up separators for mutually exclusive groups"; it removes matched 
parentheses from the argument names.  :(  I'd recommend that you instead use 
one of the following (all of which I've tested):

    parser.add_argument('--verbose[main]', ...)
    parser.add_argument('--verbose{main}', ...)
    parser.add_argument('--verbose<main>', ...)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15327>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to