[Python-Dev] Proposal: add odict to collections (original) (raw)
Alexander Schremmer 2008a at usenet.alexanderweb.de
Sun Jun 15 09:53:08 CEST 2008
- Previous message: [Python-Dev] Proposal: add odict to collections
- Next message: [Python-Dev] Proposal: add odict to collections
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Armin Ronacher wrote:
That's true, but by now there are countless of ordered dict implementations with a mostly-compatible interface and applications and libraries are using them already.
Even worse, most of them are slow, i.e. show a wrong algorithmic complexity ...
I have an example implementation here that incorporates the ideas from ordereddict, Django's OrderedDict and Babel's odict:
... like your implementation. It is not too hard to get the delitem O(log n) compared to your O(n), see here:
http://codespeak.net/svn/user/arigo/hack/pyfuse/OrderedDict.py
So many people are implementing this kind of data type but do not really care about making as fast as it could be ... IMHO yet another reason to ship a usable implementation with Python.
Kind regards, Alexander
- Previous message: [Python-Dev] Proposal: add odict to collections
- Next message: [Python-Dev] Proposal: add odict to collections
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]