Improving the all_equal recipe in itertools doc

Am I the only one reaching for EAFP here?

def all_equal(iterable):
    g = groupby(iterable)
    try:
        next(g)
        next(g)
        return False
    except StopIteration: # at most one group
        return True