def one_only(l):
    """
    Return None if `l` empty, raise exception if `len(l) > 1`, otherwise `l[0]`.
    """
    if len(l) == 1:
        return l[0]
    elif len(l) == 0:
        return None
    raise Exception('filter matched too many: {}'.format(len(l)))