-
Notifications
You must be signed in to change notification settings - Fork 34
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
for
/else
#1247
Comments
We discussed this at some length here: #1083 (and probably Discord before that) While I agree |
Some relevant Python references: I'm a fan of the capability but I'd like to find a better way to name it. The Python |
I think another interesting ambiguity, and one that arises in certain situations, perhaps during debugging if nowhere else, is whether the loop ran at all. If the body of the loop body didn't run then else block is executed, otherwise else block is not executed. This is a natural and perhaps useful way to think of an else block, as it mirrors the if else statement. |
From Python. Real-world situation where I want it:
vs with
for
/else
:The text was updated successfully, but these errors were encountered: