Skip to content

Docs: fix generic class and comprehension examples - #160908

Merged
methane merged 1 commit into
python:mainfrom
methane:fix-doc-reference
Oct 30, 2026
Merged

methane merged 1 commit into
python:mainfrom
methane:fix-doc-reference

Conversation

@methane

@methane methane commented Oct 29, 2026

Copy link
Copy Markdown
Member

No description provided.

@methane methane added docs Documentation in the Doc dir skip issue labels Oct 29, 2026
@methane
methane requested a review from willingc as a code owner October 29, 2026 16:49
@methane methane added skip news needs backport to 3.14 bugs and security fixes labels Oct 29, 2026
@methane
methane requested a review from AA-Turner as a code owner October 29, 2026 16:49
@methane methane added the needs backport to 3.15 bugs and security fixes label Oct 29, 2026
@github-project-automation github-project-automation Bot moved this to Todo in Docs PRs Oct 29, 2026
@methane
methane requested a balanced review from Copilot October 29, 2026 16:49

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

🟢 Approval recommended

No active review issues are reported for the documentation-only corrections to the Python reference examples.

No open issues 🎉

What changed in this PR

This documentation-only PR corrects comprehension and generic class examples in the Python language reference.

Changes:

  • Fixes set construction and insertion in the set-comprehension equivalent.
  • Calls the correct helper in the dictionary-comprehension example.
  • Corrects type-parameter ordering and explicitly declares the generic class parameter.
File Description
Doc/​reference/​expressions.rst Corrects set and dictionary comprehension examples.
Doc/​reference/​compound_stmts.rst Fixes type-parameter ordering and the generic Bag[T] declaration.

Review effort: Balanced

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #35503473 | 📁 Comparing fef48cd against main (8a5e24a)

  🔍 Preview build  

2 files changed
± reference/compound_stmts.html
± reference/expressions.html

@methane
methane merged commit 83fe630 into python:main Oct 30, 2026
42 checks passed
@methane
methane deleted the fix-doc-reference branch October 30, 2026 03:11
@github-project-automation github-project-automation Bot moved this from Todo to Done in Docs PRs Oct 30, 2026
@miss-islington-app

Copy link
Copy Markdown

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

@miss-islington-app

Copy link
Copy Markdown

Sorry, @methane, I could not cleanly backport this to 3.14 due to a conflict.

Please backport manually with cherry_picker, see the devguide for more information.

cherry_picker 83fe630f6f56da8acf0bb0c53639c6db30859461 3.14

@bedevere-app

bedevere-app Bot commented Oct 30, 2026

Copy link
Copy Markdown

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

@bedevere-app bedevere-app Bot removed the needs backport to 3.15 bugs and security fixes label Oct 30, 2026
methane added a commit that referenced this pull request Oct 30, 2026
(cherry picked from commit 83fe630)

Co-authored-by: Inada Naoki <[email protected]>
@bedevere-app

bedevere-app Bot commented Oct 30, 2026

Copy link
Copy Markdown

GH-160942 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 Oct 30, 2026
methane added a commit that referenced this pull request Oct 30, 2026
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