In Part VII, we study exceptions, which are software events generated
by Python on errors, or by your program on demand. Exceptions can be
caught and ignored, or allowed to pass and terminate a program with a
standard error message. Because of this, Part VII is also a part of
the debugging story in Python. As we'll see,
although standard error messages are often enough to analyse a
problem, exception handling is a lightweight tool that offers more
control.
Part VII also begins the transition from core language topics to
peripheral tool topics. Strictly speaking, exceptions are the last
core language toipic we'll meet in the book; after
Part VII, we deal with tools in the standard libray and public
domain, beyond the language itself. We conclude Part VII with an
overview of tools that are useful when developing larger applications
in Python.