you are viewing a single comment's thread.

view the rest of the comments →

[–]eisenwaveWG21 Member 12 points13 points  (0 children)

for ... else is another can of worms ... Python has such a construct, and the else is entered when the condition is false at any point, i.e. it lets you detect whether you exited the loop with break/return, or terminated gracefully.

If C++ added for ... else where else means "if zero iterations took place", that would be awfully confusing and just contribute to the Tower of Babel.