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 paul.j3
Recipients docs@python, paul.j3, retnikt, xtreak
Date 2019-07-30.17:28:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1564507684.61.0.142040247826.issue37717@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2019-07-30 17:28:04paul.j3setrecipients: + paul.j3, docs@python, xtreak, retnikt
2019-07-30 17:28:04paul.j3setmessageid: <1564507684.61.0.142040247826.issue37717@roundup.psfhosted.org>
2019-07-30 17:28:04paul.j3linkissue37717 messages
2019-07-30 17:28:04paul.j3create