Message165449
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>', ...) |
|
Date |
User |
Action |
Args |
2012-07-14 13:55:57 | samwyse | set | recipients:
+ samwyse, bethard, ezio.melotti, tshepang, Ingo.Fischer |
2012-07-14 13:55:56 | samwyse | set | messageid: <1342274156.96.0.333256233646.issue15327@psf.upfronthosting.co.za> |
2012-07-14 13:55:56 | samwyse | link | issue15327 messages |
2012-07-14 13:55:56 | samwyse | create | |
|