How do I specify that a parsed argument should be:
Falseif not specifiedTrueif present (with no value)- or the specified value
For example I would like the following to happen:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--the_arg", ...)
print(parser.parse_args(["--the_arg"]).the_arg) # should print True
print(parser.parse_args([]).the_arg) # should print False
print(parser.parse_args(["--the_arg", "my_value"]).the_arg) # should print "my_value"