This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gtitze
Recipients aroberge, docs@python, gtitze, iritkatriel, sobolevn
Date 2022-01-08.00:04:16
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>

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 to explains the raise statement and as stated in the reference, the raise statement must be followed by a class or instance derived from BaseException. Thus, I think it would just be accurate and people reading on don't stumble over this difference as I did.

Regarding the mentioned wildcard: I think it wouldn't be a real wildcard anymore if it didn't catch ALL exceptions. Anyway the tutorial states that it needs to be used with extreme caution and the example re-raises the error.


Yes I am happy provide a patch. I would also correct the other two issues you mentioned.
Date User Action Args
2022-01-08 00:04:17gtitzesetrecipients: + gtitze, aroberge, docs@python, sobolevn, iritkatriel
2022-01-08 00:04:17gtitzesetmessageid: <>
2022-01-08 00:04:17gtitzelinkissue46291 messages
2022-01-08 00:04:16gtitzecreate