Skip to content

Link to existing rules in compound_stmts.rst#149811

Merged
encukou merged 1 commit into
python:mainfrom
encukou:compound_stmts-rule-links
May 14, 2026
Merged

Link to existing rules in compound_stmts.rst#149811
encukou merged 1 commit into
python:mainfrom
encukou:compound_stmts-rule-links

Conversation

@encukou
Copy link
Copy Markdown
Member

@encukou encukou commented May 13, 2026

In gh-138418, ! was added to links to rules that don't exist in the docs, in order to silence broken link warnings. However, productionlist doesn't parse the !, which ends up in the rendered documentation. (It's possible that gh-127835 broke the ! support.)

Replace the names with ones that appear in docs:

  • star_named_expression in the grammar corresponds to flexible_expression in the docs
  • star_named_expressions in the grammar corresponds to flexible_expression_list in the docs
  • named_expression in the grammar corresponds to assignment_expression in the docs

Having two sets of names isn't great of course. Consolidating them is tracked in (subissues of) gh-127833.

In pythongh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that pythongh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) pythongh-127833.
@read-the-docs-community
Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #32681196 | 📁 Comparing 14c8cba against main (50476a7)

  🔍 Preview build  

1 file changed
± reference/compound_stmts.html

Copy link
Copy Markdown
Member

@StanFromIreland StanFromIreland left a comment

Choose a reason for hiding this comment

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

LGTM, thanks Petr!

@encukou encukou 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 May 14, 2026
@encukou encukou merged commit c375292 into python:main May 14, 2026
48 checks passed
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs May 14, 2026
@miss-islington-app
Copy link
Copy Markdown

Thanks @encukou for the PR 🌮🎉.. I'm working now to backport this PR to: 3.13, 3.14, 3.15.
🐍🍒⛏🤖

@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 14, 2026

GH-149836 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 May 14, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 14, 2026

GH-149837 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 May 14, 2026
@bedevere-app
Copy link
Copy Markdown

bedevere-app Bot commented May 14, 2026

GH-149838 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 May 14, 2026
encukou added a commit that referenced this pull request May 14, 2026
…49836)

Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c375292)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit that referenced this pull request May 14, 2026
…49837)

Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c375292)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
encukou added a commit that referenced this pull request May 14, 2026
…49838)

Link to existing rules in compound_stmts.rst (GH-149811)

In gh-138418, `!` was added to links to rules that don't exist in
the docs, in order to silence broken link warnings.
However, productionlist doesn't parse the `!`, which ends up in
the rendered documentation. (It's possible that gh-127835 broke
the `!` support.)

Replace the names with ones that appear in docs:

- `star_named_expression` in the grammar corresponds to
  `flexible_expression` in the docs
- `star_named_expressions` in the grammar corresponds to
  `flexible_expression_list` in the docs
- `named_expression` in the grammar corresponds to
  `assignment_expression` in the docs

Having two sets of names isn't great of course. Consolidating them
is tracked in (subissues of) gh-127833.
(cherry picked from commit c375292)

Co-authored-by: Petr Viktorin <encukou@gmail.com>
@encukou encukou deleted the compound_stmts-rule-links branch May 14, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs Documentation in the Doc dir skip issue skip news

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants