Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
This repository was archived by the owner on Apr 10, 2022. It is now read-only.

Commit 6cb455f

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

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎except_star.md

Copy file name to clipboardExpand all lines: except_star.md
+3-3Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.