[issue10984] argparse add_mutually_exclusive_group should accept existing arguments to register conflicts
Steven Bethard
report at bugs.python.org
Sun Jan 23 10:44:41 CET 2011
Steven Bethard <steven.bethard at gmail.com> added the comment:
I'm definitely open to providing such functionality. I assume you're imagining something like:
parser = argparse.ArgumentParser()
a_action = parser.add_argument('-a')
b_action = parser.add_argument('-b')
c_action = parser.add_argument('-c')
d_action = parser.add_argument('-d')
parser.add_mutually_exclusive_group(a_action, c_action)
parser.add_mutually_exclusive_group(a_action, d_action)
...
If you can supply a patch, I'll take a look at it.
----------
type: behavior -> feature request
versions: -Python 2.7, Python 3.1, Python 3.2
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue10984>
_______________________________________
More information about the Python-bugs-list
mailing list