mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Fix example by making the exception inherit from Exception.
This commit is contained in:
parent
cad8b0ff8e
commit
19cdee891e
1 changed files with 1 additions and 1 deletions
|
@ -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:
|
||||
...
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue