Loading django/utils/datastructures.py +3 −2 Original line number Diff line number Diff line import copy import warnings from collections import OrderedDict from django.utils import six class MergeDict(object): Loading Loading @@ -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 Loading Loading
django/utils/datastructures.py +3 −2 Original line number Diff line number Diff line import copy import warnings from collections import OrderedDict from django.utils import six class MergeDict(object): Loading Loading @@ -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 Loading