You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm interested in the feature, albeit a bit wary, and certainly you have approximately 1800% more chances of getting this feature if you have a pull request for it 🙂
My only reservation is whether this is redundant with subcommands (that you also have in Python's argparse: https://docs.python.org/3/library/argparse.html#sub-commands). Most of the time, when I have mutually exclusive group of arguments, the whole argument parser would be better redesigned with subcommands. Would that be the case in your use case, and if not I would be curious to know a bit more about it.
But on a high level we would very much welcome new features and contributions to Opt_Parse, and having a way to express the above seems like a good idea.
That is, a "built in" way of specifying that if
--foo
is provided,--bar
must also be given. Or--foo
cannot be provided with--bar
. And similar.I'm happy to implement this myself and pull-request it, if such a thing is desirable. (Any thoughts on design and implementation of such a thing would be appreciated). I'd probably go with something similar to python's argparse groups - https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_mutually_exclusive_group
The text was updated successfully, but these errors were encountered: