python / cpython

The Python programming language
https://www.python.org
Other
61.86k stars 29.75k forks source link

argparse: undocumented `nargs` constants `ONE_OR_MORE`, `OPTIONAL`, `PARSER`, `REMAINDER`, `ZERO_OR_MORE`, `SUPPRESS` #118920

Open rindeal opened 3 months ago

rindeal commented 3 months ago

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:

The following constants and their values do not seem to be documented anywhere:

SUPPRESS constant was documented for help parameter in https://github.com/python/cpython/issues/53595, but not for nargs.

vadmium commented 3 months ago

The nargs=REMAINDER documentation was removed on purpose in #61252; see also #101472