Skip to content

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

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

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

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

1 participant