Python language basics 59: catching multiple exception types
October 31, 2015 2 Comments
Introduction
In the previous post we looked at how to handle exceptions in python. The most important keywords you’ll need to know of are “try” and “except”. We saw how code execution stops at the point where the exception is raised. It continues on the first line of a matching except-block, i.e. which handles just that type of exception that was raised.
This short post shows a little trick if you want to handle different types of exception in the same way.