'Update this set from other LimitedSet, dict or iterable.'

def update(self, other):

    if (not other):
        return
    if isinstance(other, LimitedSet):
        self._data.update(other._data)
        self._refresh_heap()
        self.purge()
    elif isinstance(other, dict):
        for (key, inserted) in items(other):
            if isinstance(inserted, (tuple, list)):
                inserted = inserted[0]
            if (not isinstance(inserted, float)):
                raise ValueError(u'Expecting    float    timestamp,    got    type    {0!r}    with    value:    {1}'.format(type(inserted), inserted))
            self.add(key, inserted)
    else:
        for obj in other:
            self.add(obj)
