[issue45235] argparse does not preserve namespace with subparser defaults

2021-09-17 Thread Adam Schwalm
Change by Adam Schwalm : -- keywords: +patch pull_requests: +26832 stage: -> patch review pull_request: https://github.com/python/cpython/pull/28420 ___ Python tracker <https://bugs.python.org/issu

[issue45235] argparse does not preserve namespace with subparser defaults

2021-09-17 Thread Adam Schwalm
New submission from Adam Schwalm : The following snippet demonstrates the problem. If a subparser flag has a default set, argparse will override the existing value in the provided 'namespace' if the flag does not appear (e.g., if the default is used): import argparse parser