SwashBuckler001's picture
IdiomBench (part 6)
60f5111 verified
Raw History Blame Contribute Delete
394 Bytes
try:
try:
raise ExceptionGroup(
"msg", [
ValueError('a'), TypeError('b'),
TypeError('c'), KeyError('e')
]
)
except* ValueError as e:
print(f'got some ValueErrors: {e!r}')
except* TypeError as e:
print(f'got some TypeErrors: {e!r}')
except ExceptionGroup as e:
print(f'propagated: {e!r}')