paul j3 <ajipa...@gmail.com> added the comment:
I've noted this behavior before. https://bugs.python.org/issue27859 argparse - subparsers does not retain namespace https://bugs.python.org/issue9351 argparse set_defaults on subcommands should override top level set_defaults Due to a change 2012, the subparser gets a new blank `namespace`. When done those values are copied to the main namespace. That gives subparser defaults priority over both the main ones, and the user provided namespace. I don't entirely like that change, but it was made by the original developer. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue41684> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com