GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Incorrect information in add_subparser() docs. · Issue #95377 · python/cpython

Incorrect information in add_subparser() docs.  #95377

New issue
Copy link
New issue
Copy link
Closed as not planned
Closed as not planned
Incorrect information in add_subparser() docs. #95377
Copy link
Assignees
savannahostrowski
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir

Description

@JCrane512
JCrane512
opened on Jul 28, 2022
Issue body actions

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

  • gh-95377: Editted docs for argparse.add_subparser #95490
Reacted by MonadChains

Activity

  1. JCrane512
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    on Jul 28, 2022
  2. MonadChains commented on Jul 28, 2022

    @MonadChains
    MonadChains
    on Jul 28, 2022
    Contributor
    More actions

    I agree. The documentation is not fully clear, and adding a line to clarify it could be beneficial, especially given the complexity of the module.

  3. PurityLake
    added a commit that references this issue on Dec 24, 2022

    pythongh-95377: Removed unnessecary line in argpase.rst

    1892cfe
  4. StanFromIreland
    added this to Argparse issueson Aug 20, 2026
  5. StanFromIreland commented on Aug 20, 2026

    @StanFromIreland
    StanFromIreland
    on Aug 20, 2026
    Member
    More actions

    CC @savannahostrowski

    Reacted by Savannah Ostrowski
  6. savannahostrowski
    self-assigned this
    on Aug 20, 2026
  7. savannahostrowski commented on Aug 21, 2026

    @savannahostrowski
    savannahostrowski
    on Aug 21, 2026
    Member
    More actions

    It’s unclear which Python version this was originally reported against. The underlying problem was fixed in #3680 and backported to Python 3.9 and 3.10. When no subparser is selected, argparse tells the user that one is required: error: the following arguments are required: {foo,bar}

    It does not reproduce on any branch in the current support window so I think this can be closed.

  8. savannahostrowski
    closed this as not plannedon Aug 21, 2026
  9. github-project-automation
    moved this to Doc issues in Argparse issueson Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

  • @savannahostrowski
    savannahostrowski

Labels

docsDocumentation in the Doc dirDocumentation in the Doc dir

Projects

  • Argparse issues
    Status
    Doc issues
    Show more project fields

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.