Author paul.j3
Recipients Shani Armon, paul.j3, rhettinger
Date 2020-05-06.17:02:22
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1588784542.93.0.540923280835.issue40509@roundup.psfhosted.org>
In-reply-to
Content
A flagged argument with REMAINDER works just fine in a mutually exclusive group.

group.add_argument('-g', nargs='...')

positionals in such a group can only have ? or *.  If you check the code, and past issues you'll see that those require some special handling.  Normally that kind of positional is always 'seen', because an empty list (not strings) satisfies those nargs. One positional can work in a mutually exclusive group because it's been made to work, not because the fit is natural.

Search past issues for REMAINDER to check whether your concerns have been raised before.   If I recall correctly, even without a group, handling a flagged argument with REMAINDER is more robust than a positional.
History
Date User Action Args
2020-05-06 17:02:22paul.j3setrecipients: + paul.j3, rhettinger, Shani Armon
2020-05-06 17:02:22paul.j3setmessageid: <1588784542.93.0.540923280835.issue40509@roundup.psfhosted.org>
2020-05-06 17:02:22paul.j3linkissue40509 messages
2020-05-06 17:02:22paul.j3create