[New-bugs-announce] [issue39935] argparse: help parameter not documented in add_subparsers().add_parser

Nazime Koussaila Lakehal report at bugs.python.org
Wed Mar 11 12:25:58 EDT 2020


New submission from Nazime Koussaila Lakehal <nazime.lkh at gmail.com>:

The parameter help in the method add_parser of _SubParsersAction (that we obtain with ArgumentParser.add_subparsers()) Is not documented.

In the documentation we can find:
The add_subparsers() method is normally called with no arguments and returns a special action object. This object has a single method, add_parser(), which takes a command name and any ArgumentParser constructor arguments, and returns an ArgumentParser object that can be modified as usual.

I found the parameter by accident and then I checked in the source code, it's unfortunate because the help parameter give really nice output when having sub commands.

the parameter 'aliases' is also not documented.

----------
assignee: docs at python
components: Documentation
messages: 363932
nosy: Nazime Koussaila Lakehal, docs at python
priority: normal
severity: normal
status: open
title: argparse: help parameter not documented in add_subparsers().add_parser
type: enhancement
versions: Python 2.7, Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39935>
_______________________________________


More information about the New-bugs-announce mailing list