Add `item` to `dest` set, ensuring `item` is not present in `other`
        set.
328583
def _add_to(self, uuid, dest, other):
        """"""
        _assert_uuid(uuid)
        try:
            other.remove(uuid)
        except KeyError:
            pass
        dest.add(uuid)
394887
def append(self, item):
        
        if item in self:
            self.items[item[0]].append(item[1])
        else:
            self.items[item[0]] = [item[1]]
111147
def add(self, *items):
        
        for item in items:
            self.unsorted.append(item)
            key = item[0]
            self.index[key] = item
        return self
738777
def add_unique(self, attr, item):
        
        return self.set(attr, operation.AddUnique([item]))
941946
def set(self, safe_len=False, **kwds):
        '''
        '''
        if kwds:  # double check
            d = self.kwds()
            d.update(kwds)
            self.reset(**d)
        if safe_len and self.item:
            self.leng = _len
1020988
public void updateItem (T item)
    {
        if (_items == null) {
            return;
        }
        int idx = _items.indexOf(item);
        if (idx == -1) {
            _items.add(0, item);
        } else {
            _items.set(idx, item);
        }
    }
448340
def set(self, item: Union[Service, PublicKey]) -> 'DIDDoc':
        

        if isinstance(item, Service):
            self.service[item.id] = item
        elif isinstance(item, PublicKey):
            self.pubkey[item.id] = item
        else:
            raise BadDIDDocItem('Cannot add item {} to DIDDoc on DID {}'.format(item, self.did))
905747
function(category, name, desc) {

            if(used[name]) return;
            used[name]= 1;

            if(!items[category]) items[category] = [];
            
           items[category].push({
               name: name,
               desc: desc
           });
        }
349186
function insertAt(items, item, index) {
  var copy = items.slice();
  copy.splice(index, 0, item);
  return copy;
}
666144
public void addNotCombine(Item item)
    {
        Item innerItem = trie.get(item.key);
        if (innerItem == null)
        {
            innerItem = item;
            trie.put(innerItem.key, innerItem);
        }
    }
160539
def add_check(self, check_item):
        """"""
        self.checks.append(check_item)
        for other in self.others:
            other.add_check(check_item)
511372
def extend_unique(list1, list2):
    """"""
    for item in list2:
        if item not in list1:
            list1.append(item)
735777
def item_set_goto(itemset, inputsymbol, productionset):
    """"""
    resultset = LR0ItemSet()
    for item in itemset.itemlist:
        if item.next_symbol() == inputsymbol:
            newitem = LR0Item(item.rule, item.position + 1)
            resultset.append_item(newitem)
    return _build_item_closure(resultset, productionset)
14318
def push(self, kv):
        
        if kv[0] in self: 
            self.__delitem__(kv[0])
        self.__setitem__(kv[0], kv[1])
437464
def insert(self, index, key, value):
        """"""
        if key in self.keyOrder:
            n = self.keyOrder.index(key)
            del self.keyOrder[n]
            if n < index:
                index -= 1
        self.keyOrder.insert(index, key)
        super(SortedDict, self).__setitem__(key, value)
219238
def remove_all(self, other):
		
		if not self.is_superset(other):
			raise ValueError('Passed collection is not a subset of this bag')
		self.discard_all(other)
420503
def intersection_update(self, other):
        
        if not isinstance(other, Set):
            raise ValueError('other must be a Set instance')
        if self is other:
            return
        # we make a copy of the list so that we can remove items from
        # the list without breaking the iterator.
        for item in list(self.items):
            if item not in other.items:
                self.items.remove(item)