SwashBuckler001's picture
IdiomBench (part 6)
60f5111 verified
Raw History Blame Contribute Delete
333 Bytes
try:
raise ExceptionGroup(
"eg",
[
ValueError('a'),
TypeError('b'),
ExceptionGroup(
"nested",
[TypeError('c'), KeyError('d')])
]
)
except* TypeError as e1:
print(f'e1 = {e1!r}')
except* Exception as e2:
print(f'e2 = {e2!r}')