Hi,

Is there any chance that an ordered dict will be added to Python 3's
library?

I personally find such data structures v. useful in C++. I know that in
Python the sort function is v. fast, but often I prefer never to sort
but simply to use an ordered data structure in the first place.
(I'm aware that for ordered lists I can use the bisect module, but I
want an ordered key-value data structure.)

I think other people must find such things useful. There are three
implementations on the Python Cookbook site, and one on PyPI, all in
pure Python (plus I have my own implementation, also pure Python).

I would suppose that it would be better if it was implemented in C---for
example, my own pure Python ordered dict takes about eight times as long
to load in 18,000 items compared with loading the same into a dict.

-- 
Mark Summerfield, Qtrac Ltd., www.qtrac.eu

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

Reply via email to