Skip to content

Commit 493ab01

Browse files
committed
Update docs for BaseExceptionGroup repr change
1 parent ca2d21d commit 493ab01

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Doc/library/exceptions.rst

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,11 +1053,11 @@ their subgroups based on the types of the contained exceptions.
10531053
...
10541054
>>> match, rest = exc.split(ValueError)
10551055
>>> exc, exc.__context__, exc.__cause__, exc.__notes__
1056-
(MyGroup('eg', [ValueError(1), TypeError(2)]), Exception('context'), Exception('cause'), ['a note'])
1056+
(MyGroup('eg', (ValueError(1), TypeError(2))), Exception('context'), Exception('cause'), ['a note'])
10571057
>>> match, match.__context__, match.__cause__, match.__notes__
1058-
(MyGroup('eg', [ValueError(1)]), Exception('context'), Exception('cause'), ['a note'])
1058+
(MyGroup('eg', (ValueError(1),)), Exception('context'), Exception('cause'), ['a note'])
10591059
>>> rest, rest.__context__, rest.__cause__, rest.__notes__
1060-
(MyGroup('eg', [TypeError(2)]), Exception('context'), Exception('cause'), ['a note'])
1060+
(MyGroup('eg', (TypeError(2),)), Exception('context'), Exception('cause'), ['a note'])
10611061
>>> exc.__traceback__ is match.__traceback__ is rest.__traceback__
10621062
True
10631063

Doc/reference/compound_stmts.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ type of the target ``e`` is consistently :exc:`BaseExceptionGroup`::
388388
... except* BlockingIOError as e:
389389
... print(repr(e))
390390
...
391-
ExceptionGroup('', (BlockingIOError()))
391+
ExceptionGroup('', (BlockingIOError(),))
392392

393393
:keyword:`break`, :keyword:`continue` and :keyword:`return`
394394
cannot appear in an :keyword:`!except*` clause.

0 commit comments

Comments
 (0)