O'Reilly logo

Learning Python, 2nd Edition by David Ascher, Mark Lutz

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Part VII. Exceptions and Tools

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.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required