Python 2.6 TreeMap/SortedDictionary?

Viewed 33001

Is there a built-in sorted dictionary implementation in Python 2.6, or are hashtables the only kind?

Clarifications:

  • I'm asking about sorted dictionarys, not ordered dictionaries!
4 Answers

I wrote a Python version of the Java TreeMap/TreeSet.

Source code and documentation can be accessed in this repo

You can install with pip install pytreemap. Tested for Python >=3.5

Related