Skip to content

gh-162770: Clarify the tutorial explanation of loop else - #162821

Closed
CYJienn wants to merge 1 commit into
python:mainfrom
CYJienn:gh-162770-clarify-loop-else
Closed

CYJienn wants to merge 1 commit into
python:mainfrom
CYJienn:gh-162770-clarify-loop-else

Conversation

@CYJienn

@CYJienn CYJienn commented Nov 28, 2026 •

Copy link
Copy Markdown

Closes #162770.

Remove the if/if/if/else sentence from the tutorial's loop else section, as suggested in the issue discussion. The paragraph still walks through the condition and break in the prime-number example.

AI assistance was used to prepare the documentation edit and this PR description.

Verified the tutorial example with doctest and ran Sphinx lint on the edited file.

@python-cla-bot

python-cla-bot Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community

Copy link
Copy Markdown

Documentation build overview

📚 cpython-previews | 🛠️ Build #36234228 | 📁 Comparing 4fb5242 against main (a32f37e)

  🔍 Preview build  

1 file changed
± tutorial/controlflow.html

@sirosen sirosen left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think opening a PR here was premature. The conversation in the cited issue is ongoing.

@CYJienn, you say that you used AI tools to prepare this PR. Can you elaborate or explain what you did? Given that the change is deleting one sentence, I'm not clear on what assistance LLMs could provide.

@picnixz, I'm very unsure what to do in this case; I would be very grateful if you could advise. Given that it's an echo of my own suggestion, and I'm not confident that the author evaluated that suggestion independently, I do not feel comfortable giving it initial approval. However, I also would trust your approval if you think that's the right next step.

@picnixz

picnixz commented Nov 30, 2026

Copy link
Copy Markdown
Member

Given that it's an echo of my own suggestion

If you prefer opening a PR yourself, feel free and I would prioritize yours. Otherwise, I agree.

@picnixz picnixz closed this Nov 30, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

Unclear paragraph in Section 4.5 (else Clauses on Loops) of Tutorial

3 participants