[issue18943] argparse: default args in mutually exclusive groups

Armin Rigo report at bugs.python.org
Sat Sep 7 09:02:54 CEST 2013


Armin Rigo added the comment:

Getting consistently one behavior or the other would be much better imho; I think it's wrong-ish to have the behavior depend uncontrollably on implementation details.  But I agree that it's slightly messy to declare which of the two possible fixes is the "right" one.  I'm slightly in favor of the more permissive solution ("--bar 42" equivalent to no arguments at all if 42 is the default) only because the other solution might break someone's existing code.  If I had no such backward-compatibility issue in mind, I'd vote for the other solution (you can't specify "--bar" with any value, because you already specified "--foo").

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue18943>
_______________________________________


More information about the Python-bugs-list mailing list