I\'ve seen (and written) a number of implementations of this. Is there one that is considered the best or is emerging as a standard?
What I mean by ordered dict is
collections.OrderedDict should now be widely available, but if performance is concern, you might consider using my package cyordereddict as an alternative. It's a direct port of standard library's OrderedDict to Cython that is 2-6x faster.
collections.OrderedDict