PEP-654: state in rationale the premise that the new features will be used selectively (#1851)

This commit is contained in:
Irit Katriel 2021-03-01 04:19:13 +00:00 committed by GitHub
parent c9f4cf2e8b
commit aea3cc1016
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 7 additions and 0 deletions

View File

@ -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
=============