Why are there no ordered dictionaries?

Christoph Zwerschke cito at online.de
Wed Nov 23 15:36:45 EST 2005


Duncan Booth schrieb:
> In Javascript Object properties (often used as an associative array) are 
> defined as unordered although as IE seems to always store them in the order 
> of original insertion it wouldn't surprise me if there are a lot of 
> websites depending on that behaviour.

You're right with both. The ECMA language definition says object 
properties are an unordered collection, but MSIE and probably other 
browsers keep the order in which they were created. Of course one should 
not rely on that.

-- Christoph



More information about the Python-list mailing list