[issue46291] [doc] First argument to raise can also be BaseException
Andre Roberge
report at bugs.python.org
Fri Jan 7 14:05:38 EST 2022
Andre Roberge <andre.roberge at gmail.com> added the comment:
In https://docs.python.org/3/library/exceptions.html#Exception, it is written:
"All built-in, non-system-exiting exceptions are derived from this class. All user-defined exceptions should also be derived from this class."
Yes, technically, the root of all exceptions is BaseException. However, this seems to indicate that the advice given in the tutorial is correct.
----------
nosy: +aroberge
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46291>
_______________________________________
More information about the Python-bugs-list
mailing list