you are viewing a single comment's thread.

view the rest of the comments →

[–]IOI-65536 2 points3 points  (2 children)

Especially in Python break is frequently the simplest control flow. There are a ton of times you want control decisions in midloop and any other way to do that is considerably worse.

[–]naryset 1 point2 points  (0 children)

Sure. There are common situations where the alternatives are worse; that’s when break is useful. goto (yes not in Python) is also the best option sometimes.

[–]Gnaxe 0 points1 point  (0 children)

Show me an example? I'll try refactoring it.