Module Import Checking

Let's talk about how importlib is useful in module import checking.

Why do we need importlib?

Python has a coding style that is known as EAFP: Easier to ask for forgiveness than permission. What this means is that it’s often easier to just assume that something exists (like a key in a dict) and catch an exception if we’re wrong. We saw this previously where we would attempt to import a module and we caught the ImportError ...

Access this course and 1400+ top-rated courses and projects.