[issue46291] [doc] First argument to raise can also be BaseException

Nikita Sobolev report at bugs.python.org
Fri Jan 7 12:08:04 EST 2022


Nikita Sobolev <mail at sobolevn.me> added the comment:

I think that this is intentional: tutorial gives some very basic ideas about what can be raised. Giving the whole context (you can `raise` two kinds of errors: `Exception` and `BaseException`, but they are different, should be used in different cases, and they are caught differently). Probably most users don't need to subclass `BaseException` at all.

And if they need to: there are docs for that https://docs.python.org/3/library/exceptions.html#BaseException

In my opinion - nothing should be changed there :)

----------
nosy: +sobolevn

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue46291>
_______________________________________


More information about the Python-bugs-list mailing list