diff options
| author | Andrew Godwin <andrew@aeracode.org> | 2013-08-10 19:48:46 +0100 |
|---|---|---|
| committer | Andrew Godwin <andrew@aeracode.org> | 2013-08-10 19:50:06 +0100 |
| commit | 3c3d308ea3e017868b6530df144dd1824471b6f2 (patch) | |
| tree | 22ebc4449b8029d72d42cedac36d4e98de610964 | |
| parent | f093646bfc2b459b4e37bae8fe3f2b52e4e58ff3 (diff) | |
Back SortedSet onto OrderedDict, rename it, and a few typo fixes
| -rw-r--r-- | django/utils/datastructures.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/django/utils/datastructures.py b/django/utils/datastructures.py index 706c09593b..d61b569112 100644 --- a/django/utils/datastructures.py +++ b/django/utils/datastructures.py @@ -1,5 +1,6 @@ import copy import warnings +from collections import OrderedDict from django.utils import six class MergeDict(object): @@ -239,11 +240,11 @@ class SortedDict(dict): class SortedSet(object): """ A set which keeps the ordering of the inserted items. - Currently backs onto SortedDict. + Currently backs onto OrderedDict. """ def __init__(self, iterable=None): - self.dict = SortedDict(((x, None) for x in iterable) if iterable else []) + self.dict = OrderedDict(((x, None) for x in iterable) if iterable else []) def add(self, item): self.dict[item] = None |
