Skip to content

Commit

Permalink
[3.11] Reformat code block to make it easier to read (pythonGH-106965) (
Browse files Browse the repository at this point in the history
python#107022)

(cherry picked from commit ed491d9)

Co-authored-by: Joe Kaufeld <opensource@joekaufeld.com>
  • Loading branch information
ambv and itsthejoker committed Jul 22, 2023
1 parent a7a973e commit c65ca70
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 c65ca70

Please sign in to comment.