Skip to content

Link to existing rules in compound_stmts.rst#149811

Open
encukou wants to merge 1 commit into
python:mainfrom
encukou:compound_stmts-rule-links
Open

Link to existing rules in compound_stmts.rst#149811
encukou wants to merge 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!

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

Labels

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

2 participants