[issue33109] argparse: make new 'required' argument to add_subparsers default to False instead of True
Wolfgang Maier
report at bugs.python.org
Tue Mar 20 12:54:18 EDT 2018
Wolfgang Maier <wolfgang.maier at biologie.uni-freiburg.de> added the comment:
_wants_ is a bit a strong word, but, at least, you can do a bit a nicer job than the default error, like printing a nicely formatted list of subcommands as you would get it with the main parsers help.
In fact, in my own code I'm actually catching the missing subparser situation, then calling parse_args again with ['--help'] :)
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue33109>
_______________________________________
More information about the Python-bugs-list
mailing list