Skip to content

Commit 3eaa6f9

Browse files
bpo-42589: Change URL for 'from' link when used in a raised exception (GH-23872)
Links for 'raise Exception from x' target to 'The raise statement' (7.8) section instead of 'The import statement' (7.11) section. There are more modified links than in the bug report because I searched some other ones which can get the same improvement. (cherry picked from commit 2fd928c) Co-authored-by: sblondon <[email protected]>
1 parent 491fde0 commit 3eaa6f9

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

Doc/library/exceptions.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,12 @@ include the originating exception(s) and the final exception.
4242

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

4848
raise new_exc from original_exc
4949

50-
The expression following :keyword:`from` must be an exception or ``None``. It
50+
The expression following :keyword:`from<raise>` must be an exception or ``None``. It
5151
will be set as :attr:`__cause__` on the raised exception. Setting
5252
:attr:`__cause__` also implicitly sets the :attr:`__suppress_context__`
5353
attribute to ``True``, so that using ``raise new_exc from None``

Doc/tutorial/errors.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ re-raise the exception::
272272
Exception Chaining
273273
==================
274274

275-
The :keyword:`raise` statement allows an optional :keyword:`from` which enables
275+
The :keyword:`raise` statement allows an optional :keyword:`from<raise>` which enables
276276
chaining exceptions. For example::
277277

278278
# exc must be exception instance or None.

0 commit comments

Comments
 (0)