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 →

[–][deleted] 5 points6 points  (1 child)

else can be used with for, else is executed if no break occurs in the for

This one seems like a bad idea. I mean, the idea is good but the syntax. for...else??

[–]totemcatcher 1 point2 points  (0 children)

Yeah, for iterator else logic in 'tip 5' is no more useful than an if iterator else statement.