Remove and return value with given key or index (last item by default).

		If key is not found, returns d if given,
		otherwise raises KeyError or IndexError.

		This is generally O(N) unless removing last item, then O(1).
346653
def pop(self, key=NOT_SET, index=NOT_SET, d=NOT_SET):
		
		has_default = d is not NOT_SET

		if index is NOT_SET and key is not NOT_SET:
			index, value = self._pop_key(key, has_default)
		elif key is NOT_SET:
			key, index, value = self._pop_index(index, has_default)
		else:
			raise KEY_AND_INDEX_ERROR

		if index is None:
			return d
		else:
			self._fix_indices_after_delete(index)
			return value
91045
function(key) {

            // remove the item itself and its expiration time
            var ret = this._storage.removeItem(key);
            this._storage.removeItem(this._expiration_key_prefix + key);

            // return optional return code
            return ret;
        }
9248
def _strip_key(dictionary, keyword):
    '''
    
    '''

    for key, value in six.iteritems(dictionary):
        if key == keyword:
            dictionary[key] = None
        elif isinstance(value, dict):
            _strip_key(value, keyword)
        elif isinstance(value, list):
            for item in value:
                if isinstance(item, dict):
                    _strip_key(item, keyword)

    return dictionary
337132
def pop(self, key, default=MISSING):
        
        try:
            val = self[key]
        except KeyError:
            if default is MISSING:
                raise
            val = default
        else:
            del self[key]
        return val
928198
function(index)
  {
    var key = this.keys[ index ];
    var lastValue = AP.pop.apply( this.values );
    var lastKey = AP.pop.apply( this.keys );

    if ( index < this.values.length )
    {
      this.values[ index ] = lastValue;
      this.keys[ index ] = lastKey;
      this.indices[ lastKey ] = index;
    }

    delete this.indices[ key ];

    return this;
  }
614921
function(key){
    
        var current = this.item(key);

		if (current)
        {        
            //special case: removing first item
            if (this._head === current) {
	
                this._head = current.next;
                
                if (!this._head){
                    this._tail = null;
                } else {
                    this._head.prev = null;
                };
       
            //special case: removing last item
            } else if (this._tail === current) {
                this._tail = current.prev;
                this._tail.next = null;
            } else {
				current.prev.next = current.next;
				current.next.prev = current.prev;
            };

			this._length--;
			delete this._hash[key];
			        
            return current;            
        
        } else {
            return null;
        }
               
    }
688459
def remove(self, value):
        
        # Raise TypeError if value is not hashable
        hash(value)

        result = self.redis.srem(self.key, self._pickle(value))
        if not result:
            raise KeyError(value)
915785
def value(self, key, default=None):
        
        curr = self._stack[-1]
        return curr.get(key, default)
677308
def remove(self, item):
        ''
        i = self.index(item)
        del self._keys[i]
        del self._items[i]
18443
private void popLastItem() {
        KeyValue<K,V> lastKV = items.last();
        items.remove(lastKV);
        index.remove(lastKV.key);
    }
271599
def lastIndexOf(self, item):
        
        array = self.obj
        i = len(array) - 1
        if not (self._clean.isList() or self._clean.isTuple()):
            return self._wrap(-1)

        while i > -1:
            if array[i] is item:
                return self._wrap(i)
            i -= 1
        return self._wrap(-1)
57348
def popitem(self):
        
        for key in self.sections():
            value = self[key]
            del self[key]
            return key, value
        raise KeyError
400818
def setdefault(self, key, default=None):
        
        if key in self:
            return self[key]
        else:
            self._setitem(key, default)
            self._list_add(key)
            return default
11965
function del(/* key-1, key-N, req */) {
  var args = slice.call(arguments, 0)
    , req = typeof args[args.length-1] === 'object' ? args.pop() : null;
  var deleted = 0;
  for(var i = 0;i < args.length;i++) {
    if(this.keyExists(args[i])) {
      this.delKey(args[i], req);
      deleted++;
    }
  }
  return deleted;
}
992154
def get(self, key, default=None):
        
        if key in self:
            return self.items_dict[self.__dict__[str(type(key))][key]]
        else:
            return default
493402
def _pop(self, key, default=None):
        
        value = default
        if key in self:
            value = self[key]
            del self[key]
        return value
723352
def delete(self, key):
        ""
        if key in self.data:
            self.delete_from_index(key)
        del self.data[key]