Skip to content
This repository was archived by the owner on Apr 10, 2022. It is now read-only.

reword split() definition to get around the virtual subclass issue #29

Merged
merged 1 commit into from
Feb 16, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions except_star.md
Original file line number Diff line number Diff line change
Expand Up @@ -205,9 +205,9 @@ other side:

Since splitting by exception type is a very common use case, `subgroup` and
`split` can take an exception type or tuple of exception types and treat it
as a shorthand for matching that type: `eg.split(TypeError)`, is equivalent to
`eg.split(lambda e: isinstance(e, TypeError))`.

as a shorthand for matching that type: `eg.split(T)` divides `eg` into the
subgroup of leaf exceptions that match the type `T`, and the subgroup of those
that do not (using the same check as `except` for a match).

#### The Traceback of an `ExceptionGroup`

Expand Down