Updates the header with the supplied dictionary. If keys=None, it
        will be unsorted. Otherwise it will loop over the supplied keys
        (a list) in order.
321727
def update_headers(self, dictionary, keys=None):
        
        if keys is None: keys = list(dictionary.keys())
        for k in keys: self.insert_header(k, dictionary[k])
        return self
210040
def _update_dict(self, to_dict, from_dict):
        
        for key, value in from_dict.items():
            if key in to_dict and isinstance(to_dict[key], dict) and \
                    isinstance(from_dict[key], dict):
                self._update_dict(to_dict[key], from_dict[key])
            else:
                to_dict[key] = from_dict[key]
474629
def update_dict(self,*args, **kwargs):
        
        super(Dict, self).update(*args, **kwargs)
675047
def update(self, key, value):
        
        if not isinstance(value, dict):
            raise BadValueError(
                'The value {} is incorrect.'
                ' Values should be strings'.format(value))
        if key in self.data:
            v = self.get(key)
            v.update(value)
        else:
            v = value
        self.set(key, v)
552708
def merge_headers(header_map_list):
    
    headers = {}
    for header_map in header_map_list:
        if header_map:
            headers.update(header_map)
    return headers
607706
def update(self, new_keys: Index):
        
        if not self._map.index.intersection(new_keys).empty:
            raise KeyError("Non-unique keys in index.")

        mapping_update = self.hash_(new_keys)
        if self._map.empty:
            self._map = mapping_update.drop_duplicates()
        else:
            self._map = self._map.append(mapping_update).drop_duplicates()

        collisions = mapping_update.index.difference(self._map.index)
        salt = 1
        while not collisions.empty:
            mapping_update = self.hash_(collisions, salt)
            self._map = self._map.append(mapping_update).drop_duplicates()
            collisions = mapping_update.index.difference(self._map.index)
            salt += 1
519021
def _nary_dict_update(dicts, **kwargs):
    
    copy = kwargs['copy']
    res = dicts[0].copy() if copy else dicts[0]
    if len(dicts) == 1:
        return res

    # decide what strategy to use when updating a dictionary
    # with the values from another: {(non)recursive} x {(non)overwriting}
    deep = kwargs['deep']
    overwrite = kwargs['overwrite']
    if deep:
        dict_update = curry(_recursive_dict_update, overwrite=overwrite)
    else:
        if overwrite:
            dict_update = res.__class__.update
        else:
            def dict_update(dict_, other):
                for k, v in iteritems(other):
                    dict_.setdefault(k, v)

    for d in dicts[1:]:
        dict_update(res, d)
    return res
1202697
def header(self, headers):
        
        if isinstance(headers, list):
            for h in headers:
                self.add_header(h)
        else:
            self.add_header(headers)
111147
def add(self, *items):
        
        for item in items:
            self.unsorted.append(item)
            key = item[0]
            self.index[key] = item
        return self
163643
function update( hash, getKey, arr ) {
	var list,
		str,
		key,
		len,
		i;

	len = arr.length;
	for ( i = 0; i < len; i++ ) {
		str = arr[ i ];

		// Create a hash key...
		if ( str.length > 1 ) {
			key = getKey( str );
		} else {
			key = str;
		}
		// Check if key exists in the hash...
		if ( hash.hasOwnProperty( key ) ) {
			// Key already exists. Determine if we have already seen this string before...
			list = hash[ key ];
			if ( !contains( list, str ) ) {
				list.push ( str );
			}
		} else {
			hash[ key ] = [ str ];
		}
	}
}
1264551
def update(self, *args, **kwargs):
        
        if args:
            self.database.hmset(self.key, *args)
        else:
            self.database.hmset(self.key, kwargs)
567800
def update(self, dictionary):
        """"""
        allowed_attrs = list(self.__attributes__.keys())
        allowed_attrs += [a.alias for a in self.__attributes__.values()]
        for k in dictionary:
            # We only update existing attributes
            if k in allowed_attrs:
                setattr(self, k, dictionary[k])
        return self
153462
def sort_by_key(self, keys=None):
        
        keys = keys or self.key_on
        keys = keys if isinstance(keys, (list, tuple)) else [keys]
        for key in reversed(keys):
            reverse, key = (True, key[1:]) if key[0] == '-' else (False, key)
            self.table.sort(key=lambda row: row[key], reverse=reverse)
779655
def update(self, d):
        

        # Call __setitem__ for all keys in d
        for key in list(d.keys()):
            self.__setitem__(key, d[key])
240890
def update(self, data):
        
        result = None
        if data:
            _dumps = self._dumps
            data = {
                key: _dumps(value)
                for key, value in data.items()}
            result = self._client.hmset(self.key_prefix, data)
        return result
1045016
def update(self, *args, **kwargs):
        '''
        '''
        arg = dict_arg(*args, **kwargs)
        if isinstance(arg, list):
          for key, val in arg:
              self[key] = val
        else:
            super(AssocDict, self).update(arg)
1077225
def update(self, data):
        
        for key, value in data.items():
            setattr(self, key, value)