Skip to content

Commit

Permalink
Fixed ExceptionGroup example (#637)
Browse files Browse the repository at this point in the history
  • Loading branch information
lewoudar authored Nov 21, 2023
1 parent 0eab46a commit 97b7b08
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/tasks.rst
Original file line number Diff line number Diff line change
Expand Up @@ -115,10 +115,10 @@ exceptions::
tg.start_soon(some_task)
tg.start_soon(another_task)
except* ValueError as excgroup:
for exc in excgroup:
for exc in excgroup.exceptions:
... # handle each ValueError
except* KeyError as excgroup:
for exc in excgroup:
for exc in excgroup.exceptions:
... # handle each KeyError

If compatibility with older Python versions is required, you can use the ``catch()``
Expand Down

0 comments on commit 97b7b08

Please sign in to comment.