class Bad(Exception):
    def __repr__(self):
        raise RuntimeError("I'm a bad class!")


def a():
    x = Bad()
    return x

def b():
    x = Bad()
    raise x

a()
try:
    b()
except Exception as exc:
    print(exc)

class Bad(Exception):
    __slots__ = []

    def __repr__(self):
        raise RuntimeError("I'm a bad class!")


def a():
    x = Bad()
    return x

def b():
    x = Bad()
    raise x

a()
try:
    b()
except Exception as exc:
    print(exc)

Add __slots__ to satisfy tests (rudimentary_repr is still ordinary __repr__ if __slots__ are there).
Add __slots__ to satisfy tests (rudimentary_repr is still ordinary __repr__ if __slots__ are there).
