This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author paul.j3
Recipients ALSchwalm, miss-islington, paul.j3, rhettinger
Date 2021-10-25.23:27:59
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1635204479.84.0.06343190333.issue45235@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-10-25 23:27:59paul.j3setrecipients: + paul.j3, rhettinger, miss-islington, ALSchwalm
2021-10-25 23:27:59paul.j3setmessageid: <1635204479.84.0.06343190333.issue45235@roundup.psfhosted.org>
2021-10-25 23:27:59paul.j3linkissue45235 messages
2021-10-25 23:27:59paul.j3create