This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author samwyse
Recipients Ingo.Fischer, bethard, ezio.melotti, samwyse, tshepang
Date 2012-07-14.13:55:56
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1342274156.96.0.333256233646.issue15327@psf.upfronthosting.co.za>
In-reply-to
Content
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>', ...)
History
Date User Action Args
2012-07-14 13:55:57samwysesetrecipients: + samwyse, bethard, ezio.melotti, tshepang, Ingo.Fischer
2012-07-14 13:55:56samwysesetmessageid: <1342274156.96.0.333256233646.issue15327@psf.upfronthosting.co.za>
2012-07-14 13:55:56samwyselinkissue15327 messages
2012-07-14 13:55:56samwysecreate