def is_exc(x):
    """Check if x is the output of sys.exc_info().

    Returns
    -------
    bool
        True if matched the output of sys.exc_info().
    """
    return bool(isinstance(x, tuple)
                and len(x) == 3
                and issubclass(BaseException, x[0]))