Which class should a user-defined exception normally inherit from?
Correct answer C. Exception
Explanation
The documentation advises that user-defined exceptions should derive from Exception, directly or indirectly. Inheriting from BaseException would bypass normal except Exception handlers, and a plain object subclass cannot be raised at all. Python has no built-in class named Error, although many modules define their own error classes.
Answer checked How we write and check questions
Discussion