Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Python 2.6 TreeMap/SortedDictionary?

Tags:

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!
like image 898
user541686 Avatar asked Jul 30 '11 22:07

user541686


1 Answers

I think the answer here is no.

There is a Treemap but it isn't in the python standard library.

http://pypi.python.org/pypi/treemap/

I think to those who don't like my answer, may think it's wrong due to a recent update. Please note this is for Python 2.6, not 2.7 or Python 3

Please add the correct answer if you still think it's wrong, or unhelpful, or at least give a reason why you think it's a bad answer.

like image 147
3 revs Avatar answered Sep 19 '22 15:09

3 revs