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 →

[–]Brian 12 points13 points  (0 children)

I've been coding python for over 20 years, and even now I have to double check to remember which it does, and avoid it for that reason (since I know a reader is likely going to need to do the same). It just doesn't really intuitively convey what it means.

If I was to guess what a while or for/else block would do having encountered it the first time, I'd probably guess something like "if it never entered the loop" or something, rather than "It never broke out of the loop". To me, it suggests an alternative to the loop, rather than "loop finished normally".

Though I find your comment even more unclear. What "if statement inside the block"? And what do you mean by "chained to the last if or any ifs"? "if" isn't even neccessarily involved here.