I am trying to add an option starting with number, e.g., --3d here:
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("--3d", action="store_true")
args = parser.parse_args(['--3d'])
print(args)
parser works well, but args looks like this and I don't know how to get the value:
Namespace(**{'3d': True})
I've tried args.3d, args("3d"), args["3d"], args{"3d"}, etc, and none of them works.
I know I can add dest in add_argument() to work around this problem, but I still want to learn how to get the data in **{}.