I would like a behavior where exactly one of
--a
--b
AND--c
are required. I know how to do it if the second requirement were just --b
:
group = parser.add_mutually_exclusive_group(required=True)
group.add_argument('--a', type=str)
group.add_argument('--b', type=str)
No comments:
Post a Comment