This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author retnikt
Recipients docs@python, retnikt
Date 2019-07-30.07:44:41
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org>
In-reply-to
Content
In the library documentation for argparse, the section for ArgumentParser.add_subparsers ( https://docs.python.org/3/library/argparse.html#sub-commands ) states that there is a parameter for 'action' with the description 'the basic type of action to be taken when this argument is encountered at the command line'. However, no such parameter actually exists, and passing it to the function causes very strange behaviour:

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3.6/argparse.py", line 1716, in add_subparsers
    action = parsers_class(option_strings=[], **kwargs)
TypeError: __init__() got an unexpected keyword argument 'parser_class'

This line should be removed from the documentation. It is present in versions 3.4+ and 2.7
History
Date User Action Args
2019-07-30 07:44:41retniktsetrecipients: + retnikt, docs@python
2019-07-30 07:44:41retniktsetmessageid: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org>
2019-07-30 07:44:41retniktlinkissue37717 messages
2019-07-30 07:44:41retniktcreate