Message348718
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 |
|
Date |
User |
Action |
Args |
2019-07-30 07:44:41 | retnikt | set | recipients:
+ retnikt, docs@python |
2019-07-30 07:44:41 | retnikt | set | messageid: <1564472681.57.0.734846453793.issue37717@roundup.psfhosted.org> |
2019-07-30 07:44:41 | retnikt | link | issue37717 messages |
2019-07-30 07:44:41 | retnikt | create | |
|