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

Commit 6cb455f

Browse files
authored
reword split() definition to get around the virtual subclass issue (#29)
1 parent 7cdee24 commit 6cb455f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

except_star.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -205,9 +205,9 @@ other side:
205205

206206
Since splitting by exception type is a very common use case, `subgroup` and
207207
`split` can take an exception type or tuple of exception types and treat it
208-
as a shorthand for matching that type: `eg.split(TypeError)`, is equivalent to
209-
`eg.split(lambda e: isinstance(e, TypeError))`.
210-
208+
as a shorthand for matching that type: `eg.split(T)` divides `eg` into the
209+
subgroup of leaf exceptions that match the type `T`, and the subgroup of those
210+
that do not (using the same check as `except` for a match).
211211

212212
#### The Traceback of an `ExceptionGroup`
213213

0 commit comments

Comments
 (0)