A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-May/100206.html below:

[Python-Dev] Unordered tuples/lists

[Python-Dev] Unordered tuples/lists [Python-Dev] Unordered tuples/listsGustavo Narea me at gustavonarea.net
Wed May 19 10:28:28 CEST 2010
Hi, Guido.

On Wed, May 19, 2010 at 12:11 AM, Guido van Rossum <guido at 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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20100519/fd679c55/attachment.html>
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4