[issue26394] argparse: Add set_values() function to complement set_defaults()

2016-02-20 Thread Brett Cannon
Brett Cannon added the comment: To paraphrase Michael, he wants a way to tell argparse that an argument has to be supplied either from the command-line or some other mechanism (e.g., envvar, config file, etc.), but that if the value cannot be found in either situation, argparse fails saying th

[issue26394] argparse: Add set_values() function to complement set_defaults()

2016-02-20 Thread Michael Herold
New submission from Michael Herold: argparse has at least three features to set defaults (default=, set_defaults(), argument_default=). However, there is no feature to set the values of arguments. The difference is, that a required argument has to be specified, also if a default value exists