Skip to content

Commit ea6ec96

Browse files
authored
[3.8] bpo-42589: Change URL for 'from' link when used in a raised exc… (GH-25755)
…eption (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) This PR is a cherry pick to python 3.8 from #23872. The fix was the removal of the change in the other file because the fixed section was introduced in 3.9. So the file does not need to be fixed in 3.8. Co-authored-by: sblondon <[email protected]> Automerge-Triggered-By: GH:Mariatta
1 parent e010031 commit ea6ec96

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
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``

0 commit comments

Comments
 (0)