diff --git a/pep-0654.rst b/pep-0654.rst index ce26443f235..63e076a63d6 100644 --- a/pep-0654.rst +++ b/pep-0654.rst @@ -463,7 +463,7 @@ recursively, as follows: tbs = [] tbs.append(exc.__traceback__) - if isinstance(exc, ExceptionGroup): + if isinstance(exc, BaseExceptionGroup): for e in exc.exceptions: yield from leaf_generator(e, tbs) else: