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 Thermi
Recipients Thermi, joker, paul.j3, rhettinger, terry.reedy, wodny85
Date 2021-09-02.23:39:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1630625992.8.0.628058456487.issue44748@roundup.psfhosted.org>
In-reply-to
Content
1) True. That'd mean such functionality would not be usable by such a workaround though.

2) ANY setting has a default value. The output in the --help message has to, if any defaults at all are shown, be the same as the actual default values. Storing the default values as part of the argparse.ArgumentParser configuration prevents duplication of the default value declaration in the config file reader, and the argument parser.

What I request is the reverse of what you wrote. I want the order of priority to fall back to the defaults, if no value is specified in the config file. And if an argument is passed via argv, then that value should take precedence over what is set in the config file. This is in the first message in this issue.

3) Two different places to touch when you want to add a new option:
    1) Default config declared in program code
    2) argparse.ArgumentParser configuration in code.
History
Date User Action Args
2021-09-02 23:39:52Thermisetrecipients: + Thermi, rhettinger, terry.reedy, paul.j3, joker, wodny85
2021-09-02 23:39:52Thermisetmessageid: <1630625992.8.0.628058456487.issue44748@roundup.psfhosted.org>
2021-09-02 23:39:52Thermilinkissue44748 messages
2021-09-02 23:39:52Thermicreate