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

2022-01-07 Thread Gregor Titze
New submission from Gregor Titze : The Python Tutorial describes the first argument to the raise statement as follows: """ This must be either an exception instance or an exception class (a class that derives from Exception). """ https://docs.python.org/

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

2022-01-07 Thread Gregor Titze
Gregor Titze added the comment: Andre: You mention that user-defined exceptions should inherit from Exception. This is totally right and explicitly stated just a bit later in 8.6 on the same page of the tutorial. I think this perfectly covers this concern . However, the paragraph I refer

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

2022-01-07 Thread Gregor Titze
Gregor Titze added the comment: Irit: I would move the paragraph starting with "The except clause may specify a variable after the exception name ..." and the following example before the paragraph starting with "All exceptions inherit from BaseException, and so it can be u