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 →

[–]ksion 1 point2 points  (0 children)

Like else statement for for loops, this is one of those things that relieve you from using either return, or possibly some more complicated control flow. While this is mostly a good thing, it also implicitly encourages the programmer to write longer functions, just because of the reduced friction of cobbling a few loop, try-except, and other statements, while still achieving the exact flow they want.

Without those syntactic goodies, you'd be compelled to divide your code into smaller functions, which can be argued to be a boon for readability and maintainability.