Fix example by making the exception inherit from Exception.

This commit is contained in:
Ezio Melotti 2013-01-05 06:53:27 +02:00
parent cad8b0ff8e
commit 19cdee891e
1 changed files with 1 additions and 1 deletions

View File

@ -728,7 +728,7 @@ function calls. Many feel that exceptions can conveniently emulate all
reasonable uses of the "go" or "goto" constructs of C, Fortran, and other
languages. For example::
class label: pass # declare a label
class label(Exception): pass # declare a label
try:
...