[docs] [issue37717] argparse subcommand docs has non-existent parameter "action"

paul j3 report at bugs.python.org
Tue Jul 30 13:28:04 EDT 2019

paul j3 <ajipanca at 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

Your example using 


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 at bugs.python.org>

More information about the docs mailing list