mirror of https://github.com/python/cpython
#6880: add reference to classes section in exceptions section, which comes earlier.
This commit is contained in:
parent
076ca5a430
commit
49bb9b7f0a
|
@ -245,9 +245,10 @@ re-raise the exception::
|
|||
User-defined Exceptions
|
||||
=======================
|
||||
|
||||
Programs may name their own exceptions by creating a new exception class.
|
||||
Exceptions should typically be derived from the :exc:`Exception` class, either
|
||||
directly or indirectly. For example::
|
||||
Programs may name their own exceptions by creating a new exception class (see
|
||||
:ref:`tut-classes` for more about Python classes). Exceptions should typically
|
||||
be derived from the :exc:`Exception` class, either directly or indirectly. For
|
||||
example::
|
||||
|
||||
>>> class MyError(Exception):
|
||||
... def __init__(self, value):
|
||||
|
|
Loading…
Reference in New Issue