paul j3 <ajipa...@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 <rep...@bugs.python.org> <https://bugs.python.org/issue37717> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com