Skip to content

Commit

Permalink
Reformat code block to make it easier to read (#106965)
Browse files Browse the repository at this point in the history
  • Loading branch information
itsthejoker authored Jul 22, 2023
1 parent 4a1026d commit ed491d9
Showing 1 changed file with 14 additions and 5 deletions.
19 changes: 14 additions & 5 deletions Doc/tutorial/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -535,11 +535,20 @@ of a certain type while letting all other exceptions propagate to
other clauses and eventually to be reraised. ::

>>> def f():
... raise ExceptionGroup("group1",
... [OSError(1),
... SystemError(2),
... ExceptionGroup("group2",
... [OSError(3), RecursionError(4)])])
... raise ExceptionGroup(
... "group1",
... [
... OSError(1),
... SystemError(2),
... ExceptionGroup(
... "group2",
... [
... OSError(3),
... RecursionError(4)
... ]
... )
... ]
... )
...
>>> try:
... f()
Expand Down

0 comments on commit ed491d9

Please sign in to comment.