What is the base class in Python from which all exceptions inherit?
- BaseError
- BaseException
- Error
- Exception
The base class from which all exceptions inherit in Python is 'BaseException'. It's the root of the exception hierarchy and provides common methods like str() and args for all exceptions.
Loading...
Related Quiz
- How would you optimize a Python function that is found to be CPU-bound during profiling?
- What is the purpose of the assert statement in Python?
- In Matplotlib, how do you add a title to a plot?
- How would you enable Cross-Origin Resource Sharing (CORS) in a Flask application?
- Python's reference implementation is known as _______.