]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix example by making the exception inherit from Exception.
authorEzio Melotti <ezio.melotti@gmail.com>
Sat, 5 Jan 2013 04:53:27 +0000 (06:53 +0200)
committerEzio Melotti <ezio.melotti@gmail.com>
Sat, 5 Jan 2013 04:53:27 +0000 (06:53 +0200)
Doc/faq/design.rst

index 7c5116d0e2688c407a952e6f1896b40b2a07fbdb..44931fd689744cf99bb0280ada3af936badcd385 100644 (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:
         ...