Have You Been Handling Python Exceptions The Wrong Way?

Let me tell you how to fix it

Erik van Baaren
Aug 11 · 4 min read
Image by author

I see lots of people handling exceptions the wrong way. Perhaps this applies to you too; does the following situation sound familiar?

You’re writing some code, but you know that the library you’re using might raise an exception. You don’t remember which one, exactly. At this point, it’s tempting…