Returns True iff 'a' contains the same elements as 'b', irrespective of their order.
        # TODO: Python 2.4 has a proper set class.

def equal (a, b):
    """ Returns True iff 'a' contains the same elements as 'b', irrespective of their order.
        # TODO: Python 2.4 has a proper set class.
    """
    assert is_iterable(a)
    assert is_iterable(b)
    return contains (a, b) and contains (b, a)