Skip to main content

Chapter 12 Exceptions

An exception is a signal that a condition has occurred that canโ€™t be easily handled using the normal flow-of-control of a Python program. Exceptions are often defined as being โ€œerrorsโ€ but this is not always the case. All errors in Python are dealt with using exceptions, but not all exceptions are errors.
Last updated July 14, 2026.