Subclassed from omdict._bin_update_items() to make update() and
        updateall() process lists of values as multiple values.

        <replacements and <leftovers> are modified directly, ala pass by
        reference.
557457
def _bin_update_items(self, items, replace_at_most_one,
                          replacements, leftovers):
        
        for key, values in items:
            # <values> is not a list or an empty list.
            like_list_not_str = self._quacks_like_a_list_but_not_str(values)
            if not like_list_not_str or (like_list_not_str and not values):
                values = [values]

            for value in values:
                # If the value is [], remove any existing leftovers with
                # key <key> and set the list of values itself to [],
                # which in turn will later delete <key> when [] is
                # passed to omdict.setlist() in
                # omdict._update_updateall().
                if value == []:
                    replacements[key] = []
                    leftovers[:] = [l for l in leftovers if key != l[0]]
                    continue

                # If there are existing items with key <key> that have
                # yet to be marked for replacement, mark that item's
                # value to be replaced by <value> by appending it to
                # <replacements>.  TODO: Refactor for clarity
                if (key in self and
                    (key not in replacements or
                     (key in replacements and
                      replacements[key] == []))):
                    replacements[key] = [value]
                elif (key in self and not replace_at_most_one and
                      len(replacements[key]) < len(self.values(key))):
                    replacements[key].append(value)
                else:
                    if replace_at_most_one:
                        replacements[key] = [value]
                    else:
                        leftovers.append((key, value))
1241486
def update(self, iterable):
        """"""
        _lists = self._lists
        _maxes = self._maxes
        values = sorted(iterable)

        if _maxes:
            if len(values) * 4 >= self._len:
                values.extend(chain.from_iterable(_lists))
                values.sort()
                self._clear()
            else:
                _add = self.add
                for val in values:
                    _add(val)
                return

        _load = self._load
        _lists.extend(values[pos:(pos + _load)]
                      for pos in range(0, len(values), _load))
        _maxes.extend(sublist[-1] for sublist in _lists)
        self._len = len(values)
        del self._index[:]
385555
def update(self, *args, **kwargs):
        
        d = {}
        d.update(*args, **kwargs)
        for key, value in d.items():
            self[key] = value
765585
def update(self, iterable):
        
        if iterable:
            return PBag(reduce(_add_to_counters, iterable, self._counts))

        return self
1190937
def update(d,ud):
    
    if ud is None:
        return
    for key,value in ud.items():
        if not key in d:
            d[key] = value
        elif isinstance(value,dict):
            update(d[key],value)
        else:
            d[key] = value
81457
def intersection_update(self, *iterables):
        
        _set = self._set
        _list = self._list
        _set.intersection_update(*iterables)
        _list.clear()
        _list.update(_set)
        return self
489727
def dict_update_overwrite_check(base, fresh):
    

    result = [
        (key, base[key], fresh[key])
        for key in set(base.keys()) & set(fresh.keys())
        if base[key] != fresh[key]
    ]
    base.update(fresh)
    return result
9973
def dict_filter_update(base, updates):
    # type: (dict, dict) -> None
    
    base.update((k, v) for k, v in updates.items() if v is not None)
38
def _put_one(self, item):
        ''' 
        '''
        # prepare values
        values = []
        for k, v in item.items():
            if k == '_id':
                continue
            if 'dblite_serializer' in item.fields[k]:
                serializer = item.fields[k]['dblite_serializer']
                v = serializer.dumps(v)
                if v is not None:
                    v = sqlite3.Binary(buffer(v))
            values.append(v)

        # check if Item is new => update it
        if '_id' in item:
            fieldnames = ','.join(['%s=?' % f for f in item if f != '_id'])
            values.append(item['_id'])
            SQL = 'UPDATE %s SET %s WHERE rowid=?;' % (self._table, fieldnames)
        # new Item
        else:
            fieldnames = ','.join([f for f in item if f != '_id'])
            fieldnames_template = ','.join(['?' for f in item if f != '_id'])
            SQL = 'INSERT INTO %s (%s) VALUES (%s);' % (self._table, fieldnames, fieldnames_template)

        try:
            self._cursor.execute(SQL, values)
        except sqlite3.OperationalError, err:
            raise RuntimeError('Item put() error, %s, SQL: %s, values: %s' % (err, SQL, values) )
        except sqlite3.IntegrityError:
            raise DuplicateItem('Duplicate item, %s' % item)
        self._do_autocommit()
1260006
def _recursive_dict_update(dict_, other, **kwargs):
    
    overwrite = kwargs['overwrite']

    for key, other_value in iteritems(other):
        if key in dict_:
            value = dict_[key]
            if is_mapping(value) and is_mapping(other_value):
                _recursive_dict_update(value, other_value, overwrite=overwrite)
                continue
        if overwrite:
            dict_[key] = other_value
        else:
            dict_.setdefault(key, other_value)
599907
def perform_update(self, data, instance):
        

        for key, val in data.items():
            setattr(instance, key, val)
1012965
def _compile_update_columns(self, values):
        
        columns = []

        for key, value in values.items():
            columns.append("%s = %s" % (self.wrap(key), self.parameter(value)))

        return ", ".join(columns)
55021
def update(self, values, **context):
        
        schema = self.schema()
        column_updates = {}
        other_updates = {}
        for key, value in values.items():
            try:
                column_updates[schema.column(key)] = value
            except orb.errors.ColumnNotFound:
                other_updates[key] = value

        # update the columns in order
        for col in sorted(column_updates.keys(), key=lambda x: x.order()):
            self.set(col, column_updates[col], **context)

        # update the other values
        for key, value in other_updates.items():
            try:
                self.set(key, value, **context)
            except orb.errors.ColumnValidationError:
                pass

        return len(values)
70897
def update(self, values, force=False):
        
        results = {}
        for k, v in six.iteritems(values):
            results[k] = self.__setitem__(k, v, force=force)
        return results
468797
function updateall(bin){ 
  // Compute all binary representations
  var bin08 = bintruncate(bin, 8);
  var bin18 = onescomplement(bin08);
  var bin28 = bintruncate(twoscomplement(bin18), 8);
  var bin016 = bintruncate(bin, 16);
  var bin116 = onescomplement(bin016);
  var bin216 = bintruncate(twoscomplement(bin116), 16);
  var bin032 = bintruncate(bin, 32);
  var bin132 = onescomplement(bin032);
  var bin232 = bintruncate(twoscomplement(bin132), 32);
  var bin064 = bintruncate(bin, 64);
  var bin164 = onescomplement(bin064);
  var bin264 = bintruncate(twoscomplement(bin164), 64);
  var bin0n = bintruncate(bin, 8 * Math.ceil(bin.length / 8));
  var bin1n = onescomplement(bin0n);
  var bin2n = bintruncate(twoscomplement(bin1n), 8 * Math.ceil(bin.length / 8));
  //  var bin2n = twoscomplement(bin1n);
  
  // Put all formatted strings on screen.
  var o;
  var sign;
  
  // Decimal
  data.dec08=bintodecoutput(bin08);
  data.dec016=bintodecoutput(bin016);
  data.dec032=bintodecoutput(bin032);
  data.dec064=bintodecoutput(bin064);
  data.dec0n=bintodecoutput(bin0n);
  if(bin18[0]){
     data.dec18 = "-" + bintodecoutput(onescomplement(bin18.slice(1)));
  }else{
    data.dec18 = bintodecoutput(bin18);
  }
  if(bin116[0]){
    data.dec116 = "-" + bintodecoutput(onescomplement(bin116.slice(1)));
  }else{
    data.dec116 = bintodecoutput(bin116);
  }
  if(bin132[0]){
    data.dec132 = "-" + bintodecoutput(onescomplement(bin132.slice(1)));
  }else{
    data.dec132 = bintodecoutput(bin132);
  }
  if(bin164[0]){
    data.dec164 = "-" + bintodecoutput(onescomplement(bin164.slice(1)));
   }else{
    data.dec164 = bintodecoutput(bin164);
  }
  if(bin1n[0]){
    data.dec1n = "-" + bintodecoutput(onescomplement(bin1n.slice(1)));
  }else{
    data.dec1n = bintodecoutput(bin1n);
  }
  if(bin28[0]){
    data.dec28 = "-" + bintodecoutput(twoscomplement(onescomplement(bin28.slice(1))));
  }else{
    data.dec28 = bintodecoutput(bin28);
  }
  if(bin216[0]){
    data.dec216 = "-" + bintodecoutput(twoscomplement(onescomplement(bin216.slice(1))));
  }else{
    data.dec216 = bintodecoutput(bin216);
  }
  if(bin232[0]){
    data.dec232 = "-" + bintodecoutput(twoscomplement(onescomplement(bin232.slice(1))));
  }else{
    data.dec232 = bintodecoutput(bin232);
  }
  if(bin264[0]){
    data.dec264 = "-" + bintodecoutput(twoscomplement(onescomplement(bin264.slice(1))));
  }else{
    data.dec264 = bintodecoutput(bin264);
  }
  if(bin2n[0]){
    data.dec2n = "-" + bintodecoutput(twoscomplement(onescomplement(bin2n.slice(1))));
  }else{
    data.dec2n = bintodecoutput(bin2n);
  }
  
  // Hexadecimal
  data.hex08=bintohexoutput(bin08);
  data.hex016=bintohexoutput(bin016);
  data.hex032=bintohexoutput(bin032);
  data.hex064=bintohexoutput(bin064);
  data.hex0n=bintohexoutput(bin0n);
  data.hex18=bintohexoutput(bin18);
  data.hex116=bintohexoutput(bin116);
  data.hex132=bintohexoutput(bin132);
  data.hex164=bintohexoutput(bin164);
  data.hex1n=bintohexoutput(bin1n);
  data.hex28=bintohexoutput(bin28);
  data.hex216=bintohexoutput(bin216);
  data.hex232=bintohexoutput(bin232);
  data.hex264=bintohexoutput(bin264);
  data.hex2n=bintohexoutput(bin2n);

  // Binary
  data.bin08=bintohexoutput(bin08);
  data.bin016=bintohexoutput(bin016);
  data.bin032=bintohexoutput(bin032);
  data.bin064=bintohexoutput(bin064);
  data.bin0n=bintohexoutput(bin0n);
  data.bin18=bintohexoutput(bin18);
  data.bin116=bintohexoutput(bin116);
  data.bin132=bintohexoutput(bin132);
  data.bin164=bintohexoutput(bin164);
  data.bin1n=bintohexoutput(bin1n);
  data.bin28=bintohexoutput(bin28);
  data.bin216=bintohexoutput(bin216);
  data.bin232=bintohexoutput(bin232);
  data.bin264=bintohexoutput(bin264);
  data.bin2n=bintohexoutput(bin2n);

  // Octal
  data.oct08=bintooctoutput(bin08);
  data.oct016=bintooctoutput(bin016);
  data.oct032=bintooctoutput(bin032);
  data.oct064=bintooctoutput(bin064);
  data.oct0n=bintooctoutput(bin0n);
  data.oct18=bintooctoutput(bin18);
  data.oct116=bintooctoutput(bin116);
  data.oct132=bintooctoutput(bin132);
  data.oct164=bintooctoutput(bin164);
  data.oct1n=bintooctoutput(bin1n);
  data.oct28=bintooctoutput(bin28);
  data.oct216=bintooctoutput(bin216);
  data.oct232=bintooctoutput(bin232);
  data.oct264=bintooctoutput(bin264);
  data.oct2n=bintooctoutput(bin2n);
}
836870
def copy_and_update(dictionary, update):
    """"""
    newdict = dictionary.copy()
    newdict.update(update)
    return newdict
1020250
def update_without_overwrite(d, *args, **kwds):
    
    if args:
        assert len(args) == 1, \
            'At most one positional parameter is allowed: {0!r}'.format(args)

        (other,) = args
        if isinstance(other, Mapping):
            for key in other:
                setitem_without_overwrite(d, key, other[key])
        elif hasattr(other, "keys"):
            for key in other.keys():
                setitem_without_overwrite(d, key, other[key])
        else:
            for key, value in other:
                setitem_without_overwrite(d, key, value)

    for key, value in kwds.items():
        setitem_without_overwrite(d, key, value)