PEP-654: fix bug in leaf_generator example (#1910)

This commit is contained in:
Irit Katriel 2021-04-04 16:26:04 +01:00 committed by GitHub
parent 9fadf9cf0a
commit 6d94d73dfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -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: