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 — argparse: help parameter not documented in add_subparsers().add_parser · Issue #84116 · python/cpython

argparse: help parameter not documented in add_subparsers().add_parser #84116

New issue
Copy link
New issue
Copy link
Closed
Closed
argparse: help parameter not documented in add_subparsers().add_parser#84116
Copy link
Labels
docsDocumentation in the Doc dirDocumentation in the Doc direasy

Description

NazimeKoussailaLakehal
mannequin
opened on Mar 11, 2020
Issue body actions
BPO 39935
Nosy @rhettinger, @rahul-kumi

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = None
created_at = <Date 2020-03-11.16:25:58.045>
labels = ['3.8', 'type-feature', '3.7', '3.9', 'docs']
title = 'argparse: help parameter not documented in add_subparsers().add_parser'
updated_at = <Date 2020-03-11.19:07:12.784>
user = 'https://bugs.python.org/NazimeKoussailaLakehal'

bugs.python.org fields:

activity = <Date 2020-03-11.19:07:12.784>
actor = 'rahul-kumi'
assignee = 'docs@python'
closed = False
closed_date = None
closer = None
components = ['Documentation']
creation = <Date 2020-03-11.16:25:58.045>
creator = 'Nazime Koussaila Lakehal'
dependencies = []
files = []
hgrepos = []
issue_num = 39935
keywords = []
message_count = 1.0
messages = ['363932']
nosy_count = 5.0
nosy_names = ['rhettinger', 'docs@python', 'paul.j3', 'rahul-kumi', 'Nazime Koussaila Lakehal']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue39935'
versions = ['Python 3.7', 'Python 3.8', 'Python 3.9']

Linked PRs

  • gh-84116: Docs: Document help and aliases for argparse.add_parser() #140574
  • gh-84116: Add missing backslash to _SubParsersAction.add_parser signature #144572

Activity

Next
  1. NazimeKoussailaLakehal commented on Mar 11, 2020

    @NazimeKoussailaLakehal
    NazimeKoussailaLakehalmannequin
    on Mar 11, 2020
    MannequinAuthor
    More actions

    The parameter help in the method add_parser of _SubParsersAction (that we obtain with ArgumentParser.add_subparsers()) Is not documented.

    In the documentation we can find:
    The add_subparsers() method is normally called with no arguments and returns a special action object. This object has a single method, add_parser(), which takes a command name and any ArgumentParser constructor arguments, and returns an ArgumentParser object that can be modified as usual.

    I found the parameter by accident and then I checked in the source code, it's unfortunate because the help parameter give really nice output when having sub commands.

    the parameter 'aliases' is also not documented.

  2. NazimeKoussailaLakehal
    added
    3.7 (EOL)end of lifeend of life
    3.8 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    on Mar 11, 2020
  3. NazimeKoussailaLakehal
    assigned
    docspython
    on Mar 11, 2020
  4. NazimeKoussailaLakehal
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    3.7 (EOL)end of lifeend of life
    type-featureA feature request or enhancementA feature request or enhancement
    3.8 (EOL)end of lifeend of life
    3.9 (EOL)end of lifeend of life
    on Mar 11, 2020
  5. NazimeKoussailaLakehal
    assigned
    docspython
    on Mar 11, 2020
  6. NazimeKoussailaLakehal
    added
    docsDocumentation in the Doc dirDocumentation in the Doc dir
    type-featureA feature request or enhancementA feature request or enhancement
    on Mar 11, 2020
  7. ezio-melotti
    transferred this issue fromon Apr 10, 2022
  8. slateny commented on Apr 25, 2022

    @slateny
    slateny
    on Apr 25, 2022
    Contributor
    More actions

    A few paragraphs into the add_subparsers() section, it says:

    (A help message for each subparser command, however, can be given by supplying the help= argument to add_parser() as above.)

    Then a few paragraphs further in, it says:

    Furthermore, add_parser supports an additional aliases argument, which allows multiple strings to refer to the same subparser.

    So it seems that it's technically documented, but just not as well structured as say add_subparsers()

    Reacted by Sam Sneddon
  9. 7 remaining items

  10. serhiy-storchaka
    added
    easy
    on Oct 23, 2024
  11. savannahostrowski
    self-assigned this
    on Nov 5, 2024
  12. savannahostrowski
    removed their assignment
    on Sep 20, 2025
  13. Krishna-web-hub commented on Oct 19, 2025

    @Krishna-web-hub
    Krishna-web-hub
    on Oct 19, 2025
    Contributor
    More actions

    Hi @serhiy-storchaka ,
    I'm happy to take this on! I will submit a PR to clearly document the help and aliases parameters for add_subparsers().add_parser() in the argparse documentation. I'll aim to have a PR ready soon.

  14. serhiy-storchaka commented on Oct 20, 2025

    @serhiy-storchaka
    serhiy-storchaka
    on Oct 20, 2025
    Member
    More actions

    You are welcome, @Krishna-web-hub.

  15. Krishna-web-hub
    added 3 commits that reference this issue on Oct 25, 2025

    Docs: Document help and aliases for argparse.add_parser() (pythongh-8…

    57a35b9

    Docs: Document help and aliases for argparse.add_parser() (pythongh-8…

    343648b

    Docs: Document help and aliases for argparse.add_parser() (pythongh-8…

    4b07ba3
  16. savannahostrowski
    added a commit that references this issue on Feb 6, 2026

    gh-84116: Docs: Document help and aliases for argparse.add_parser() (#…

    74db440
  17. savannahostrowski
    closed this as completedon Feb 6, 2026
  18. picnixz
    added a commit that references this issue on Feb 7, 2026

    gh-84116: Add missing backslash to `_SubParsersAction.add_parser` sig…

    6665115
  19. thunder-coding
    added 2 commits that reference this issue on Feb 15, 2026

    pythongh-84116: Docs: Document help and aliases for argparse.add_pars…

    d095dc3

    pythongh-84116: Add missing backslash to `_SubParsersAction.add_parse…

    a2e7792
  20. ljfp
    added 2 commits that reference this issue on Apr 25, 2026

    pythongh-84116: Docs: Document help and aliases for argparse.add_pars…

    87f5018

    pythongh-84116: Add missing backslash to `_SubParsersAction.add_parse…

    bfa3131
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    docsDocumentation in the Doc dirDocumentation in the Doc direasy

    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.