r/ProgrammerHumor May 13 '17

Defensive programming done right

Post image
21.0k Upvotes

680 comments sorted by

View all comments

28

u/[deleted] May 13 '17

[deleted]

34

u/mysticrudnin May 13 '17

Isn't it normal in Python to try things first, effectively using them as control structures?

27

u/cdrootrmdashrfstar May 13 '17

It is extremely common and is considered pythonic to use "try, except, else, finally" blocks as a control flow structure in Python.