Sitelet https://web.archive.org/web/20260624063906/https://github.com/python/cpython/issues/95377
Skip to content

Incorrect information in add_subparser() docs.  #95377

Description

@JCrane512

Documentation

When setting the flag required=true for the function ArgumentParser.add_subparsers() the setting dest=" some description" also needs to be set or the parser throws an unhelpful error when the user fails to select a subparser.

This is not covered in the documentation.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dir
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions