def all(iterable):
    """Return True if all elements of the iterable are true (or if it's empty).
    This is a builtin in Python 2.5+, but doesn't exist in 2.4.

    """
    for element in iterable:
        if not element:
            return False
    return True