洪 民憙 (Hong Minhee)@lemmy.ml to Programming@programming.devEnglish · 10 days agoStop writing CLI validation. Parse it right the first time.hackers.pubexternal-linkmessage-square20fedilinkarrow-up1115arrow-down16
arrow-up1109arrow-down1external-linkStop writing CLI validation. Parse it right the first time.hackers.pub洪 民憙 (Hong Minhee)@lemmy.ml to Programming@programming.devEnglish · 10 days agomessage-square20fedilink
minus-squareazertyfun@sh.itjust.workslinkfedilinkarrow-up3·9 days agohttps://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.
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.