[docs] [issue20624] Clarify recommendation to inherit from Exception

Mark Dickinson report at bugs.python.org
Fri Feb 14 12:31:29 CET 2014


New submission from Mark Dickinson:

>From http://docs.python.org/3.4/library/exceptions.html:

"... programmers are encouraged to at least derive new exceptions from the Exception class and not BaseException."

This wording had someone I've talked to recently thinking that user-defined exceptions should inherit *directly* from Exception.

Suggested rewording, dropping the "at least" qualification that as far as I can tell serves no real purpose:

"... programmers are encouraged to derive new exceptions from the Exception class or one of its subclasses, and not from BaseException."

----------
assignee: docs at python
components: Documentation
messages: 211214
nosy: docs at python, mark.dickinson
priority: normal
severity: normal
status: open
title: Clarify recommendation to inherit from Exception
versions: Python 2.7, Python 3.3, Python 3.4

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue20624>
_______________________________________


More information about the docs mailing list