Skip to content

Add separate match and case doc to pydoc #91177

Closed as not planned
Closed as not planned

Description

@duckboycool
BPO 47021
Nosy @duckboycool

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 2022-03-15.02:10:46.629>
labels = ['type-feature', 'library']
title = 'Add separate match and case doc to pydoc'
updated_at = <Date 2022-03-15.02:10:46.629>
user = 'https://github.com/duckboycool'

bugs.python.org fields:

activity = <Date 2022-03-15.02:10:46.629>
actor = 'duckboycool'
assignee = 'none'
closed = False
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2022-03-15.02:10:46.629>
creator = 'duckboycool'
dependencies = []
files = []
hgrepos = []
issue_num = 47021
keywords = []
message_count = 1.0
messages = ['415217']
nosy_count = 1.0
nosy_names = ['duckboycool']
pr_nums = []
priority = 'normal'
resolution = None
stage = None
status = 'open'
superseder = None
type = 'enhancement'
url = 'https://bugs.python.org/issue47021'
versions = []

Activity

  1. duckboycool commented on Mar 15, 2022

    duckboycoolmannequin
    MannequinAuthor

    Currently pydoc (and therefore things like the interactive help prompt) do not have documentation for the soft-keywords "match" and "case".

    help> match
    No Python documentation found for 'match'.
    Use help() to get the interactive help utility.
    Use help(str) for help on the str class.
    

    I think that it would make sense for both of these prompts to give the docs for the match statement (https://docs.python.org/3/reference/compound_stmts.html#the-match-statement) similar to the other compound statements.

    The "compound" doc already contains the match statement documentation, but is unnecessarily long at over 48000 characters, and is only accessed by the unhelpful named for this purpose "LOOPING" prompt. As soft keywords, they also might be best added in a separate section in "keywords" (and potentially with "_", although this already refers to "PRIVATENAMES" and is in "symbols").

    A standalone match and case doc is not currently present in the Lib/pydoc_data/topics.py file automatically generated from documentation, and would need to be added in some way to do this.

  2. added
    stdlibStandard Library Python modules in the Lib/ directory
    type-featureA feature request or enhancement
    on Mar 15, 2022
  3. transferred this issue fromon Apr 10, 2022
  4. hugovk commented on Jan 7, 2025

    @hugovk
    Member

    This issue was reported earlier, but let's close as a duplicate of #105895, which has a PR. Thanks for the report!

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

    stdlibStandard Library Python modules in the Lib/ directorytype-featureA feature request or enhancement

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions