From e4e4e749c31df21089436e304056f2c21f6a2170 Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sat, 15 Mar 2025 11:23:29 +0800 Subject: [PATCH 1/5] PEP 758: Mark as Accepted --- peps/pep-0758.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/peps/pep-0758.rst b/peps/pep-0758.rst index 9f7dc270005..83f285ac9bc 100644 --- a/peps/pep-0758.rst +++ b/peps/pep-0758.rst @@ -2,11 +2,12 @@ PEP: 758 Title: Allow ``except`` and ``except*`` expressions without parentheses Author: Pablo Galindo , Brett Cannon PEP-Delegate: TBD -Status: Draft +Status: Accepted Type: Standards Track Created: 30-Sep-2024 Python-Version: 3.14 Post-History: `02-Oct-2024 `__ +Resolution: https://discuss.python.org/t/pep-758-allow-except-and-except-expressions-without-parentheses/66453/63 Abstract ======== From 74e82da5e40a008758c85a83f55b3aea435ada98 Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sat, 15 Mar 2025 11:43:00 +0800 Subject: [PATCH 2/5] Update peps/pep-0758.rst Co-authored-by: Adam Turner <9087854+AA-Turner@users.noreply.github.com> --- peps/pep-0758.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0758.rst b/peps/pep-0758.rst index 83f285ac9bc..fbeea86209a 100644 --- a/peps/pep-0758.rst +++ b/peps/pep-0758.rst @@ -7,7 +7,7 @@ Type: Standards Track Created: 30-Sep-2024 Python-Version: 3.14 Post-History: `02-Oct-2024 `__ -Resolution: https://discuss.python.org/t/pep-758-allow-except-and-except-expressions-without-parentheses/66453/63 +Resolution: `14-Mar-2025 `__ Abstract ======== From 42e9b36239d90c40008ee0b5465b0105b8c058d1 Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sun, 16 Mar 2025 13:48:31 +0800 Subject: [PATCH 3/5] fix a typo --- peps/pep-0758.rst | 1 - 1 file changed, 1 deletion(-) diff --git a/peps/pep-0758.rst b/peps/pep-0758.rst index fbeea86209a..0107096fade 100644 --- a/peps/pep-0758.rst +++ b/peps/pep-0758.rst @@ -1,7 +1,6 @@ PEP: 758 Title: Allow ``except`` and ``except*`` expressions without parentheses Author: Pablo Galindo , Brett Cannon -PEP-Delegate: TBD Status: Accepted Type: Standards Track Created: 30-Sep-2024 From 0ef3b74317a4ae2a3d5208e8b77312e19bfaa4c8 Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sun, 16 Mar 2025 13:52:14 +0800 Subject: [PATCH 4/5] Update pep-0758.rst From f70f50ff626a1f04687bbecae8134a1b06177815 Mon Sep 17 00:00:00 2001 From: Wulian233 <1055917385@qq.com> Date: Sun, 16 Mar 2025 13:53:23 +0800 Subject: [PATCH 5/5] Update pep-0758.rst --- peps/pep-0758.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/peps/pep-0758.rst b/peps/pep-0758.rst index 0107096fade..85fbbbc8a1a 100644 --- a/peps/pep-0758.rst +++ b/peps/pep-0758.rst @@ -57,7 +57,7 @@ The same change would apply to ``except*`` expressions. For example: except* ExceptionA, ExceptionB, ExceptionC: ... -When using the ``as`` clause to capture the exception instance paretheses must +When using the ``as`` clause to capture the exception instance parentheses must be used as before. Some users have expressed that they would find it confusing not to require parentheses as it would be unclear what exactly is being assigned to the target since in other parts of the language multiple ``as`` clauses can be used