July 30, 2019
5:28 p.m.
paul j3 <ajipanca@gmail.com> added the comment: As discussed in https://bugs.python.org/issue23487, `action` works if the class is compatible with argparse._SubParsersAction. these commands all do the same thing: parser.add_subparsers() # default parser.add_subparsers(action='parsers') parser.add_subparsers(action=argparse._SubParsersAction) Your example using parser.add_subparsers(action='store') raises the error because the argparse._StoreAction class cannot handle the `parser_class` parameter that add_subparsers has added to the kwargs. ---------- _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue37717> _______________________________________