8000 For-else deserves its own section in the tutorial by nedbat · Pull Request #123946 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

For-else deserves its own section in the tutorial #123946

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Sep 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Update Doc/tutorial/controlflow.rst
Co-authored-by: Jelle Zijlstra <jelle.zijlstra@gmail.com>
  • Loading branch information
nedbat and JelleZijlstra authored Sep 25, 2024
commit b42d86cd3473b272018e86c6e5bca2172dd4448d
2 changes: 1 addition & 1 deletion Doc/tutorial/controlflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@ iteration of the loop::

In a :keyword:`!for` or :keyword:`!while` loop the :keyword:`!break` statement
may be paired with an :keyword:`!else` clause. If the loop finishes without
executing the break, the else clause executes.
executing the :keyword:`!break`, the :keyword:`!else` clause executes.

In a :keyword:`for` loop, the :keyword:`!else` clause is executed
after the loop finishes its final iteration, that is, if no break occurred.
Expand Down
Loading
0