15.04.2013 Views

Core Python Programming (2nd Edition)

Core Python Programming (2nd Edition)

Core Python Programming (2nd Edition)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

10.8. Standard Exceptions<br />

Table 10.2 lists all of <strong>Python</strong>'s current set of standard exceptions. All exceptions are loaded into the<br />

interpreter as built-ins so they are ready before your script starts or by the time you receive the<br />

interpreter prompt, if running interactively.<br />

Table 10.2. <strong>Python</strong> Built-In Exceptions<br />

Exception Name Description<br />

[a] Root class for<br />

BaseException<br />

all exceptions<br />

[b] Request<br />

SystemExit<br />

termination of<br />

<strong>Python</strong><br />

interpreter<br />

[c] User<br />

KeyboardInterrupt<br />

interrupted<br />

execution<br />

(usually by<br />

typing ^C)<br />

[d] Root class for<br />

Exception<br />

regular<br />

exceptions<br />

[e] Iteration has<br />

StopIteration<br />

no further<br />

values<br />

[a] Exception sent<br />

GeneratorExit<br />

to generator<br />

to tell it to quit<br />

[h] Request<br />

SystemExit<br />

termination of<br />

<strong>Python</strong><br />

interpreter<br />

[g] Base class for<br />

StandardError<br />

all standard<br />

built-in excep<br />

tions<br />

ArithmeticError [d] Base class for<br />

all numeric<br />

calculation<br />

errors

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!