Version 4 (modified by oyvind, 15 years ago) ( diff )

--

SortedDict

One of Django's custom data structure classes
source: http://code.djangoproject.com/browser/django/trunk/django/utils/datastructures.py#L53

A dictionary that keeps its keys in the order in which they're inserted.

Supports the following extra methods:

insert(index, key, value)
Inserts the key, value pair before the item with the given index."

value_for_index(index)
Returns the value of the item at the given zero-based index.

Note: See TracWiki for help on using the wiki.
Back to Top