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 docs@python, gtitze
Date 2022-01-07.13:30:17
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641562217.88.0.523387156492.issue46291@roundup.psfhosted.org>
In-reply-to
Content
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/3/tutorial/errors.html#raising-exceptions

However, the Python Language Reference states, that exceptions should be a subclass or instance of BaseException.
https://docs.python.org/3/reference/simple_stmts.html#grammar-token-python-grammar-raise_stmt

I think it would be correct, to adapt the Tutorial to match the Reference.
History
Date User Action Args
2022-01-07 13:30:17gtitzesetrecipients: + gtitze, docs@python
2022-01-07 13:30:17gtitzesetmessageid: <1641562217.88.0.523387156492.issue46291@roundup.psfhosted.org>
2022-01-07 13:30:17gtitzelinkissue46291 messages
2022-01-07 13:30:17gtitzecreate