summaryrefslogtreecommitdiffstats
path: root/Doc/library/exceptions.rst
diff options
context:
space:
mode:
authorMark Dickinson <dickinsm@gmail.com>2014-04-14 15:20:12 (GMT)
committerMark Dickinson <dickinsm@gmail.com>2014-04-14 15:20:12 (GMT)
commitabf079de2556578a4250c671ddbb83e7399b3e1d (patch)
treee6a03dfb6a4619ff4421f7fc97048d2f9af81fa2 /Doc/library/exceptions.rst
parent604453c9cea5dfcc5c6373028d0c30a4bd4f94f2 (diff)
downloadcpython-abf079de2556578a4250c671ddbb83e7399b3e1d.zip
cpython-abf079de2556578a4250c671ddbb83e7399b3e1d.tar.gz
cpython-abf079de2556578a4250c671ddbb83e7399b3e1d.tar.bz2
Issue #20624: Exception docs wording tweak - clarify that it's okay to inherit from a subclass of Exception.
Diffstat (limited to 'Doc/library/exceptions.rst')
-rw-r--r--Doc/library/exceptions.rst8
1 files changed, 4 insertions, 4 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 0642a13..45a6b1b 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -28,10 +28,10 @@ handler or to report an error condition "just like" the situation in which the
interpreter raises the same exception; but beware that there is nothing to
prevent user code from raising an inappropriate error.
-The built-in exception classes can be sub-classed to define new exceptions;
-programmers are encouraged to at least derive new exceptions from the
-:exc:`Exception` class and not :exc:`BaseException`. More information on
-defining exceptions is available in the Python Tutorial under
+The built-in exception classes can be subclassed to define new exceptions;
+programmers are encouraged to derive new exceptions from the :exc:`Exception`
+class or one of its subclasses, and not from :exc:`BaseException`. More
+information on defining exceptions is available in the Python Tutorial under
:ref:`tut-userexceptions`.
When raising (or re-raising) an exception in an :keyword:`except` clause