paul j3 <[email protected]> added the comment:
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.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40509>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com