-
-
Notifications
You must be signed in to change notification settings - Fork 33.3k
Closed
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir
Description
Documentation
The documentation for except* states
An except* clause must have a matching type, and this type cannot be a subclass of BaseExceptionGroup.
This incorrectly implies that there can only be one matching type, when tuples of types are allowed in except*.
I propose to change this to:
An except* clause must have a matching type or a tuple of matching types, which cannot be a subclass of BaseExceptionGroup.
This has been discussed in the forum: https://discuss.python.org/t/clarifying-typing-behavior-for-exception-handlers-except-except/55060
Linked PRs
Metadata
Metadata
Assignees
Labels
docsDocumentation in the Doc dirDocumentation in the Doc dir