Updates recursively a self with a given iterable.

        TODO: rewrite this ugly stuff
962177
def update(self, iterable={}, **kwargs):
        
        def _merge(a, *args):
            for key, value in itertools.chain(*args):
                if key in a and isinstance(value, (dict, Conf)):
                    value = _merge(a[key], value.items())
                a[key] = value
            return a

        # adopt iterable sequence to unified interface: (key, value)
        if isinstance(iterable, (dict, Conf)):
            iterable = iterable.items()

        # iterate and update values
        _merge(self._data, iterable, kwargs.items())
1097362
def recursive_update(_dict, _update):
    
    for k, v in _update.items():
        if isinstance(v, collections.Mapping):
            r = recursive_update(_dict.get(k, {}), v)
            _dict[k] = r
        else:
            _dict[k] = _update[k]
    return _dict
778235
def fromrepetitions(cls, iterable):
        
        d = cls()
        for key in iterable:
            d[key] = d[key] + 1 if key in d else 1
        return d
530789
def update(self, d):
        
        for (k, v) in d.items():
            if k not in self or self[k] != v:
                self[k] = v
210266
def extend(self, iterable):
        
        with self.lock:
            for item in iterable:
                self.append(item)
98828
def update(self, *args):
        
        for d in args:
            for (key, value) in d.items():
                self.__setitem__(key, value)
1127585
def update(self, *args, **kwargs):
        
        if len(args) > 1:
            raise TypeError("update expected at most 1 arguments, got %d" % len(args))

        for key, value in dict(*args, **kwargs).items():
            self[key] = value
117329
def iter_islast(iterable):
    
    it = iter(iterable)
    prev = next(it)
    for item in it:
        yield prev, False
        prev = item
    yield prev, True
47877
function(collection, cb) {
    _iterate(collection, cb, function(val, key) {
      cb(val, key);
    });
  }
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)
137149
def recursive_update(target, update):
    
    for key in update:
        value = update[key]
        if value is None:
            del target[key]
        elif isinstance(value, dict):
            target[key] = recursive_update(target.get(key, {}), value)
        else:
            target[key] = value
    return target
954712
def call(cls, iterable, *a, **kw):
    

    return cls(x(*a, **kw) for x in iterable)
652314
def recursive_replace(list_, target, repl=-1):
    
    """
    repl_list = [
        recursive_replace(item, target, repl) if isinstance(item, (list, np.ndarray)) else
        (repl if item == target else item)
        for item in list_
    ]
    return repl_list
686657
async def update(self):
    '''
    
    '''
    keys = self.extras.keys()
    self.extras = {}
    for key in keys:
      try:
        func = getattr(self, key, None)
        if callable(func):
          func()
      except:
        pass
1299028
def update(self, iterable):
        
        inserted_any = False
        for header in iterable:
            key = header.lower()
            if key not in self._set:
                self._headers.append(header)
                self._set.add(key)
                inserted_any = True
        if inserted_any and self.on_update is not None:
            self.on_update(self)
621523
def update(self, key_vals=None, overwrite=True):
        
        if not key_vals:
            return
        write_items = self._update(key_vals, overwrite)
        self._root._root_set(self._path, write_items)
        self._root._write(commit=True)
68332
def update(self):
        
        diff = self._diff()
        if not diff:
            # Nothing to do!
            return
        self.parent.update_node(self, diff)