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/2005-March/051989.html below:

[Python-Dev] LinkedHashSet/LinkedHashMap equivalents

[Python-Dev] LinkedHashSet/LinkedHashMap equivalentsAnthony Baxter anthony at interlink.com.au
Thu Mar 10 14:15:03 CET 2005
On Thursday 10 March 2005 17:29, Raymond Hettinger wrote:
> Or the implementation can have a switch to choose between keep-first
> logic or replace logic.
>
> The latter seems a bit odd to me.  The key position would be determined
> by the first encountered while the value would be determined by the last
> encountered.  Starting with [(10, v1), (20, v2), (10.0, v3)], the
> ordered dictionary's items would look like [(10, v3), (20, v2)].

Or, alternately, we keep the last occurence, and move it to the new position.
There's a wide number of different use cases, each with a slightly different
final result, and for this reason alone I'm -0 on it for the library. 

Anthony

-- 
Anthony Baxter     <anthony at interlink.com.au>
It's never too late to have a happy childhood.
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