paul j3 <ajipa...@gmail.com> added the comment:
parser = argparse.ArgumentParser() sub = parser.add_subparsers() example_subparser = sub.add_parser("example") example_subparser.add_argument("--flag", default=10) print(parser.parse_args(["example","--flag=15"], argparse.Namespace(flag=20))) still returns flag=20 User input should override values set by the provided Namespace. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue45235> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com