Basically imagine that I have argparser that has multiple arguments. I have a particular function definition that looks like this:
def add_to_parser(self, parser):
group = parser.add_argument_group('')
group.add_argument( '--deprecateThis', action='throw exception', help='Stop using this. this is deprecated')
Whether I can try and create that action to throw an exception and stop the code or if I can wrap it to check for the deprecateThis
flag and then throw an exception, I'd like to know how to do it and which is best! Thanks.
type
function that throws an error if anything is supplied to it. Or yes, just check after the parsing if there's anything in that argument. – Jemisontype
: https://mcmap.net/q/156402/-specify-date-format-for-python-argparse-input-arguments – Jemison