There was a somewhat ancient discussion on OrderedDict and OrderedSet before:

The resolution seemed to be that neither of them should be in stdlib. Now that OrderedDict is in and Raymond Hettinger has created a solid OrderedSet implementation: , could the latter also be included in collections?

Here's a very generic use-case:

def _update_key(dct, key, val):
    Update a key in dict *dct*. If they key already exists in *dct* but the
    value doesn't, a set of previous values is created and the value added to it.
    if key in dct:
        if dct[key] == val:
        s = set(dct[key])
        dct[key] = s
        dct[key] = val

The problem is that I both need to remove duplicates and retain insertion order like list.append().