Skip to content
Commit aadd09dd authored by Eric N. Vander Weele's avatar Eric N. Vander Weele
Browse files

Set configuration file-provided values via ArgumentParser.set_defaults()

When calling `ArgumentParser.parse_args()` with the `namespace`
argument, command-line options are just added to the  namespace without
going through any of the argument parsing and type conversion logic
(e.g., the `type` keyword argument of `ArgumentParser.add_argument()`).
In other words, it is assumed that a namespace is well-formed from a
previous invocation of `ArgumentParser.parse_args()`.

The `values` parameter is intended to be values already-provided from
configuration files.  To take advantage of the logic defined by
`ArgumentParser.add_argument()`,  utilize
`ArgumentParser.set_defaults()` instead.
parent b231c100
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment