summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorsblondon <sblondon@users.noreply.github.com>2021-04-29 18:02:40 (GMT)
committerGitHub <noreply@github.com>2021-04-29 18:02:40 (GMT)
commit2fd928c8c1328424130cb9c51fc02ad5f9a66328 (patch)
tree4ba7efccb2f20f1d7ff2e813a8a33dc2c1e273d5 /Doc
parent76cd81d60310d65d01f9d7b48a8985d8ab89c8b4 (diff)
downloadcpython-2fd928c8c1328424130cb9c51fc02ad5f9a66328.zip
cpython-2fd928c8c1328424130cb9c51fc02ad5f9a66328.tar.gz
cpython-2fd928c8c1328424130cb9c51fc02ad5f9a66328.tar.bz2
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.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/exceptions.rst4
-rw-r--r--Doc/tutorial/errors.rst2
2 files changed, 3 insertions, 3 deletions
diff --git a/Doc/library/exceptions.rst b/Doc/library/exceptions.rst
index 1b9a5fa..c83daae 100644
--- a/Doc/library/exceptions.rst
+++ b/Doc/library/exceptions.rst
@@ -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``
diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst
index fd0477f..25bb4fc 100644
--- a/Doc/tutorial/errors.rst
+++ b/Doc/tutorial/errors.rst
@@ -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.