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}')