]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-42589: Change URL for 'from' link when used in a raised exception (GH-23872)
authorsblondon <sblondon@users.noreply.github.com>
Thu, 29 Apr 2021 18:02:40 +0000 (20:02 +0200)
committerGitHub <noreply@github.com>
Thu, 29 Apr 2021 18:02:40 +0000 (11:02 -0700)
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.

Doc/library/exceptions.rst
Doc/tutorial/errors.rst

index 1b9a5facd87cdc7d5f86b06671ea8e7a15e6d3da..c83daae302c19d5bab8259e18f46b66ac1c05908 100644 (file)
@@ -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``
index fd0477f078949a6da684c3eaa109eb0c4567c46d..25bb4fc567b95bc7ff9b8d6a533c7df2946b53e2 100644 (file)
@@ -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.