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 — gh-105895: Add `match` and `case` to `help` topics by dzherb · Pull Request #132784 · python/cpython

Conversation

@dzherb

@dzherb dzherb commented Apr 21, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: help seems to have no information on match or case #105895

📚 Documentation preview 📚: https://cpython-previews--132784.org.readthedocs.build/

  • Issue: help seems to have no information on match or case #105895

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dzherb
Add "match" and "case" keywords to pydoc help topics
29c6771
@dzherb
dzherb requested review from AA-Turner and hugovk as code owners April 21, 2025 18:33
@python-cla-bot

python-cla-bot Bot commented Apr 21, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot added the awaiting review label Apr 21, 2025
@bedevere-app

bedevere-app Bot commented Apr 21, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@bedevere-app bedevere-app Bot mentioned this pull request Apr 21, 2025
No Python documentation found for 'match' #132783
Closed
@dzherb

dzherb commented Apr 21, 2025

Copy link
Copy Markdown
Contributor Author

I'm not sure if I should also commit the autogenerated topics.py

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dzherb

dzherb commented Apr 21, 2025 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor Author

This test case fails not due to unsorted keywords, but because match and case are not present in keyword.kwlist. Instead, they are listed in keyword.softkwlist, along with entries like type and _.

class TestHelper(unittest.TestCase):
    def test_keywords(self):
        self.assertEqual(sorted(pydoc.Helper.keywords),
                         sorted(keyword.kwlist))

I suggest splitting this into two separate cases:

class TestHelper(unittest.TestCase):
    def test_keywords_are_sorted(self):
        self.assertEqual(
            sorted(pydoc.Helper.keywords),
            list(pydoc.Helper.keywords),
        )

    def test_keywords_in_grammar(self):
        all_keywords = set(keyword.kwlist) | set(keyword.softkwlist)
        for kw in pydoc.Helper.keywords:
            self.assertIn(kw, all_keywords)
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dzherb
chore: undo elif doc change and update TestHelper
be64319
@bedevere-app

bedevere-app Bot commented May 5, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn
sobolevn reviewed May 6, 2025
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I checked out this PR and tried:

Снимок экрана 2025-05-06 в 15 21 31

I think that you need to regen pydoc-topics with: make -C Doc pydoc-topics

It might take a while.

Also, add a NEWS entry (see #132784 (comment) about how to do that) and change the issue number :) I will update you PR title for you to match the original issue #132783

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dzherb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@sobolevn sobolevn changed the title gh-132783: Add match and case to help topics gh-105895: Add match and case to help topics May 6, 2025
@bedevere-app bedevere-app Bot mentioned this pull request May 6, 2025
help seems to have no information on match or case #105895
Closed
@dzherb
Merge branch 'python:main' into pythongh-132783-match-help
915c753
@bedevere-app

bedevere-app Bot commented May 6, 2025

Copy link
Copy Markdown

Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool.

If this change has little impact on Python users, wait for a maintainer to apply the skip news label instead.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dzherb added 3 commits May 6, 2025 21:26
@dzherb
doc: build topics.py
23028c4
@dzherb
Merge remote-tracking branch 'origin/pythongh-132783-match-help' into p…
b32f947
…ythongh-105895-match-help
@dzherb
chore: add a NEWS entry
020d98e
sobolevn
sobolevn reviewed May 6, 2025
View reviewed changes
Comment thread Lib/pydoc.py Resolved

Uh oh!

There was an error while loading. Please reload this page.

@dzherb
chore: restore 'else' related topics and rebuild topics.py
77eafce
@dzherb
dzherb requested a review from sobolevn May 7, 2025 11:57
dzherb added 2 commits May 8, 2025 20:35
@dzherb
Merge branch 'main' into pythongh-105895-match-help
f2bf4c8
# Conflicts:
#	Lib/pydoc_data/topics.py
@dzherb
chore: rebuild topics.py
f37c8e2
@dzherb

dzherb commented May 9, 2025

Copy link
Copy Markdown
Contributor Author

@sobolevn could you please look at the last changes? Is everything ok?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn
sobolevn reviewed May 9, 2025
View reviewed changes

@sobolevn sobolevn left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, but I can't merge this PR. Since I am not an expert in pydoc and I need someone who knows how it actually works to verify :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dzherb reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
StanFromIreland
StanFromIreland reviewed Feb 11, 2026
View reviewed changes

@StanFromIreland StanFromIreland left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are conflicts that need to be fixed.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Lib/pydoc_data/topics.py

@StanFromIreland StanFromIreland Feb 11, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please revert changes to this file, they will be automatically done before a release.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread Misc/NEWS.d/next/Documentation/2025-05-06-21-35-31.gh-issue-105895.B1rPvE.rst

@StanFromIreland StanFromIreland Feb 11, 2026

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move to "Library"

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@hugovk
hugovk removed their request for review April 6, 2026 12:45
@github-actions

github-actions Bot commented May 14, 2026

Copy link
Copy Markdown

This PR is stale because it has been open for 30 days with no activity.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added the stale Stale PR or inactive for long period of time. label May 14, 2026
@sobolevn sobolevn mentioned this pull request May 15, 2026
gh-142349: Add help("lazy") support #149886
Merged
@StanFromIreland

StanFromIreland commented Jun 24, 2026

Copy link
Copy Markdown
Member

Closing, changes haven't been made.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@StanFromIreland StanFromIreland closed this Jun 24, 2026
@sobolevn

sobolevn commented Jun 24, 2026

Copy link
Copy Markdown
Member

I will take this over and credit @dzherb for their work :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

sobolevn added a commit to sobolevn/cpython that referenced this pull request Jun 24, 2026
@sobolevn @dzherb
pythongh-105895: Add match and case to help()
5cec021
Originally published in python#132784

Co-authored-by: dzherb <[email protected]>
@sobolevn sobolevn mentioned this pull request Jun 24, 2026
gh-105895: Add match and case to help() #152113
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@sobolevn sobolevn sobolevn left review comments
@StanFromIreland StanFromIreland StanFromIreland left review comments
@AA-Turner AA-Turner Awaiting requested review from AA-Turner AA-Turner is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review stale Stale PR or inactive for long period of time.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@dzherb @StanFromIreland @sobolevn
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402520 — 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.