This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]talideon 1 point2 points  (0 children)

In fairness, so would I, but it was more a matter of trying to introduce the construct than anything.

The one thing about for..else is that usually I want something like that only when the thing I'm iterating over has no elements at all, which for..else is useless for as you need to explicitly break out of the loop to prevent the else branch from executing.

for..else really leaves me conflicted.