File size: 394 Bytes
60f5111
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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}')