▲ 109 ▼ Stop writing CLI validation. Parse it right the first time. (hackers.pub) submitted 11 months ago by hongminhee@lemmy.ml to c/programming@programming.dev 18 comments fedilink hide all child comments
[–] azertyfun@sh.itjust.works 3 points 11 months ago https://docs.python.org/3/library/argparse.html#argparse.ArgumentParser.add_mutually_exclusive_group However I've never had to use that feature. Like I said it can make sense in specific contexts but it is a pretty strong indicator that you have built in a CLI antipattern or too much complexity. permalink fedilink source parent