From c590b581bba517f81ced2e6f531ccc9e2e22eab5 Mon Sep 17 00:00:00 2001 From: Irit Katriel <1055913+iritkatriel@users.noreply.github.com> Date: Thu, 13 Jan 2022 12:35:58 +0000 Subject: bpo-46328: Add sys.exception() (GH-30514) --- Doc/tutorial/errors.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Doc/tutorial') diff --git a/Doc/tutorial/errors.rst b/Doc/tutorial/errors.rst index ad1ef841bf..888740cdd0 100644 --- a/Doc/tutorial/errors.rst +++ b/Doc/tutorial/errors.rst @@ -167,7 +167,7 @@ then re-raise the exception (allowing a caller to handle the exception as well): raise Alternatively the last except clause may omit the exception name(s), however the exception -value must then be retrieved from ``sys.exc_info()[1]``. +value must then be retrieved with ``sys.exception()``. The :keyword:`try` ... :keyword:`except` statement has an optional *else clause*, which, when present, must follow all *except clauses*. It is useful -- cgit v1.2.1