Hi, Guido.

On Wed, May 19, 2010 at 12:11 AM, Guido van Rossum <gu...@python.org> wrote:

> This is typically called a "bag". Maybe searching for that will help
> you find a recipe?
>

A bag/multiset is close to what I need, except for one thing: I need to
iterate over the elements in the original order, not in a random order.

The data structure I'm proposing is basically a list/tuple, and the only
thing that changes is comparison with another unordered list/tuple: If they
both have the same elements with the same multiplicity, they are equivalent
(regardless of the order).

Cheers,

 - Gustavo.
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to