New submission from Thermi <noel.kuntze+bugs-python-org@thermi.consulting>:
It'd be great if as part of the namespace returned by argparse.ArgumentParser.parse_args(), there was a bool indicating if a specific argument was encountered. That could then be used to implement the following behaviour: With a config file loaded as part of the program, overwrite the values loaded from the config file if the argument was encountered in the argument vector. That's necessary to implement overwriting of settings that were previously set by a different mechanism, e.g. read from a config file. After all the following order of significance should be used: program defaults < config file < argument vector ---------- components: Library (Lib) messages: 398288 nosy: Thermi priority: normal severity: normal status: open title: argparse: a bool indicating if arg was encountered type: enhancement versions: Python 3.11 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44748> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com