From aea3cc101675d547cac3e7be25f1a4bd538d5d95 Mon Sep 17 00:00:00 2001 From: Irit Katriel <iritkatriel@yahoo.com> Date: Mon, 1 Mar 2021 04:19:13 +0000 Subject: [PATCH] PEP-654: state in rationale the premise that the new features will be used selectively (#1851) --- pep-0654.rst | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/pep-0654.rst b/pep-0654.rst index 8912e3dac69..1ee5d4e3c62 100644 --- a/pep-0654.rst +++ b/pep-0654.rst @@ -119,6 +119,13 @@ The purpose of this PEP, then, is to add the ``except*`` syntax for handling handling semantics, so we are not proposing to modify the behavior of the ``except`` keyword but rather to add the new ``except*`` syntax. +Our premise is that ``ExceptionGroups`` and ``except*`` will be used +selectively, only when they are needed. We do not expect them to become +the default mechanism for exception handling. The decision to raise +``ExceptionGroup`` from a library needs to be considered carefully and +regarded as an API-breaking change. We expect that this will normally be +done by introducing a new API rather than modifying an existing one. + Specification =============