Skip to content

gh-156614: Fix function parameter grammar in documentation - #156622

Merged
StanFromIreland merged 3 commits into
python:mainfrom
challenge456:fix-156614-function-parameter-grammar
Aug 30, 2026
Merged

gh-156614: Fix function parameter grammar in documentation#156622
StanFromIreland merged 3 commits into
python:mainfrom
challenge456:fix-156614-function-parameter-grammar

Conversation

@challenge456

Copy link
Copy Markdown
Contributor

gh-156614: Fix function parameter grammar in documentation

The language reference incorrectly documents the parameter following a
bare * as optional in parameter_list_starargs.

This change makes star_parameter required in the documentation grammar
to match the actual CPython grammar and parser behavior.

The generated Lib/pydoc_data/topics.py file has also been updated.

Tests:

  • PCbuild\amd64\python.exe -m test test_syntax
  • 107 tests passed

@python-cla-bot

python-cla-bot Bot commented Aug 30, 2026

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@bedevere-app

bedevere-app Bot commented Aug 30, 2026

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.

@read-the-docs-community

read-the-docs-community Bot commented Aug 30, 2026

Copy link
Copy Markdown

Comment thread Lib/pydoc_data/topics.py

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Please revert this.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I still see changes in this file?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I removed it.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

You removed a news entry but I still see changes that need to be reverted in topics.py?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Done.

Comment thread Misc/NEWS.d/next/Documentation/2026-08-30-10-00-00.gh-issue-156614.A7kP2m.rst Outdated
@challenge456
challenge456 force-pushed the fix-156614-function-parameter-grammar branch from 653120d to 93801aa Compare August 30, 2026 12:32
@StanFromIreland
StanFromIreland merged commit 852381e into python:main Aug 30, 2026
34 checks passed
@StanFromIreland StanFromIreland added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes needs backport to 3.15 pre-release feature fixes, bugs and security fixes labels Aug 30, 2026
@miss-islington-app

Copy link
Copy Markdown

Thanks @challenge456 for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.13.
🐍🍒⛏🤖 I'm not a witch! I'm not a witch!

@miss-islington-app

Copy link
Copy Markdown

Thanks @challenge456 for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.14.
🐍🍒⛏🤖

@miss-islington-app

Copy link
Copy Markdown

Thanks @challenge456 for the PR, and @StanFromIreland for merging it 🌮🎉.. I'm working now to backport this PR to: 3.15.
🐍🍒⛏🤖

@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

GH-156671 is a backport of this pull request to the 3.13 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.13 bugs and security fixes label Aug 30, 2026
@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

GH-156672 is a backport of this pull request to the 3.14 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.14 bugs and security fixes label Aug 30, 2026
@bedevere-app

bedevere-app Bot commented Aug 30, 2026

Copy link
Copy Markdown

GH-156673 is a backport of this pull request to the 3.15 branch.

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 pre-release feature fixes, bugs and security fixes label Aug 30, 2026
@challenge456
challenge456 deleted the fix-156614-function-parameter-grammar branch August 30, 2026 17:12
@StanFromIreland

Copy link
Copy Markdown
Member

Merged, thanks.

StanFromIreland pushed a commit that referenced this pull request Aug 30, 2026
…rence (GH-156622) (#156671)

(cherry picked from commit 852381e)

Co-authored-by: Aradhya Gupta <aradhyakb2021@gmail.com>
StanFromIreland pushed a commit that referenced this pull request Aug 30, 2026
…rence (GH-156622) (#156672)

(cherry picked from commit 852381e)

Co-authored-by: Aradhya Gupta <aradhyakb2021@gmail.com>
hugovk pushed a commit that referenced this pull request Aug 30, 2026
…rence (GH-156622) (#156673)

Co-authored-by: Aradhya Gupta <aradhyakb2021@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants