cpython
cpython copied to clipboard
argparse: undocumented `nargs` constants `ONE_OR_MORE`, `OPTIONAL`, `PARSER`, `REMAINDER`, `ZERO_OR_MORE`, `SUPPRESS`
Concerning the possible values of the nargs
parameter of add_argument()
.
The following values are already described in the documentation, so only a mention of the constants is needed:
-
OPTIONAL
=?
-
ZERO_OR_MORE
=*
-
ONE_OR_MORE
=+
The following constants and their values do not seem to be documented anywhere:
-
PARSER
-
REMAINDER
SUPPRESS
constant was documented for help
parameter in https://github.com/python/cpython/issues/53595, but not for nargs
.