argparse
argparse copied to clipboard
Change of argument
How can I declare an argument and then change its value? Like in the Python: parser.arg = value Thx.
Unlike the Python argparser, this argparse does not return a Namespace object from ::parse_args, but stores values in the ArgumentParser instance. This storage is not assignable except through ::parse_args.
A pattern I have used in my own argparse-using projects is to ::get values and assign them to other variables as part of the program setup.
I see. Thank you so much.