OrderedDictionary (was: Re: [squeak-dev] Re: The Trunk: Collections-mt.593.mcz)

Bert Freudenberg bert at freudenbergs.de
Fri Jan 16 11:13:00 UTC 2015


On 16.01.2015, at 09:39, Marcel Taeumel <marcel.taeumel at student.hpi.uni-potsdam.de> wrote:
> 
> https://www.python.org/dev/peps/pep-0372/

Interesting. This states that the order is never updated: when an existing element is overwritten, it is not moved to the end. Only new keys are appended. This allows for a more efficient implementation (such as suggested by Levente).

I think an OrderedDictionary would most often be used to preserve the original order of keys. Assigning a new value should not move the item to the end.

- Bert -

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4115 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20150116/79fc922b/smime.bin


More information about the Squeak-dev mailing list