Summary
In this chapter, we went into the gritty details of raising, handling, defining, and manipulating exceptions. Exceptions are a powerful way to communicate unusual circumstances or error conditions without requiring a calling function to explicitly check return values. Specifically, we covered:
- Built-in exceptions and raising exceptions
- Several ways to handle specific exceptions
- Defining new exceptions
- Using exceptions for unexceptional circumstances
In the next chapter, everything we've studied so far will come together as we discuss how object-oriented programming principles and structures should best be applied in Python applications.
Get Python 3 Object Oriented Programming now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.