Sitelet https://github.com/python/cpython/commit/abf079de2556578a4250c671ddbb83e7399b3e1d
Skip to content

Commit abf079d

Browse files
committed
Issue #20624: Exception docs wording tweak - clarify that it's okay to inherit from a subclass of Exception.
1 parent 604453c commit abf079d

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

‎Doc/library/exceptions.rst‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ handler or to report an error condition "just like" the situation in which the
2828
interpreter raises the same exception; but beware that there is nothing to
2929
prevent user code from raising an inappropriate error.
3030

31-
The built-in exception classes can be sub-classed to define new exceptions;
32-
programmers are encouraged to at least derive new exceptions from the
33-
:exc:`Exception` class and not :exc:`BaseException`. More information on
34-
defining exceptions is available in the Python Tutorial under
31+
The built-in exception classes can be subclassed to define new exceptions;
32+
programmers are encouraged to derive new exceptions from the :exc:`Exception`
33+
class or one of its subclasses, and not from :exc:`BaseException`. More
34+
information on defining exceptions is available in the Python Tutorial under
3535
:ref:`tut-userexceptions`.
3636

3737
When raising (or re-raising) an exception in an :keyword:`except` clause

0 commit comments

Comments
 (0)