Skip to content

bpo-42589: Change URL for 'from' link when used in a raised exception #23872

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Doc/library/exceptions.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,12 @@ include the originating exception(s) and the final exception.

When raising a new exception (rather than using a bare ``raise`` to re-raise
the exception currently being handled), the implicit exception context can be
supplemented with an explicit cause by using :keyword:`from` with
supplemented with an explicit cause by using :keyword:`from<raise>` with
:keyword:`raise`::

raise new_exc from original_exc

The expression following :keyword:`from` must be an exception or ``None``. It
The expression following :keyword:`from<raise>` must be an exception or ``None``. It
will be set as :attr:`__cause__` on the raised exception. Setting
:attr:`__cause__` also implicitly sets the :attr:`__suppress_context__`
attribute to ``True``, so that using ``raise new_exc from None``
Expand Down
2 changes: 1 addition & 1 deletion Doc/tutorial/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -272,7 +272,7 @@ re-raise the exception::
Exception Chaining
==================

The :keyword:`raise` statement allows an optional :keyword:`from` which enables
The :keyword:`raise` statement allows an optional :keyword:`from<raise>` which enables
chaining exceptions. For example::

# exc must be exception instance or None.
Expand Down