Mercurial > cpython-lru_cache-weakref
diff Doc/tutorial/errors.rst @ 55984:bb6ade51a0b6 legacy-trunk
#6880: add reference to classes section in exceptions section, which comes earlier.
| author | Georg Brandl <georg@python.org> |
|---|---|
| date | Wed, 16 Sep 2009 09:23:04 +0000 |
| parents | 20bfc1d35989 |
| children | 3385e6182112 |
line wrap: on
line diff
--- a/Doc/tutorial/errors.rst Wed Sep 16 09:05:11 2009 +0000 +++ b/Doc/tutorial/errors.rst Wed Sep 16 09:23:04 2009 +0000 @@ -245,9 +245,10 @@ 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):
