From 0685ed6676fdcf905b4ebb044f62b089be700d43 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Fri, 5 Sep 2025 16:13:54 +0100 Subject: [PATCH 1/2] Doc: Apply keyword role around finally (in sys module doc) --- Doc/library/sys.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 30fd4db1fd1851..9bf0d6a20a40c3 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -523,7 +523,7 @@ always available. Unless explicitly noted otherwise, all variables are read-only Since :func:`exit` ultimately "only" raises an exception, it will only exit the process when called from the main thread, and the exception is not - intercepted. Cleanup actions specified by finally clauses of :keyword:`try` statements + intercepted. Cleanup actions specified by :keyword:`finally` clauses of :keyword:`try` statements are honored, and it is possible to intercept the exit attempt at an outer level. .. versionchanged:: 3.6 From 43c31b9cbd64b426d61ea41175cf8d122e6a8852 Mon Sep 17 00:00:00 2001 From: Adorilson Bezerra Date: Fri, 5 Sep 2025 17:09:40 +0100 Subject: [PATCH 2/2] Doc: Wrapper text to keep the line length down --- Doc/library/sys.rst | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Doc/library/sys.rst b/Doc/library/sys.rst index 9bf0d6a20a40c3..70d68c06187b60 100644 --- a/Doc/library/sys.rst +++ b/Doc/library/sys.rst @@ -523,8 +523,9 @@ always available. Unless explicitly noted otherwise, all variables are read-only Since :func:`exit` ultimately "only" raises an exception, it will only exit the process when called from the main thread, and the exception is not - intercepted. Cleanup actions specified by :keyword:`finally` clauses of :keyword:`try` statements - are honored, and it is possible to intercept the exit attempt at an outer level. + intercepted. Cleanup actions specified by :keyword:`finally` clauses of + :keyword:`try` statements are honored, and it is possible to intercept the + exit attempt at an outer level. .. versionchanged:: 3.6 If an error occurs in the cleanup after the Python interpreter