code: def fromdict(self, src_dict, method='set'):
          
          if method == 'set':
              _method = self.set_method
          else:
              _method = self.add_method
          if hasattr(src_dict, 'iteritems'):
              for (key, val) in src_dict.iteritems():
                  _method(self, key, len(key), val)
                  if self.k:
                      self._update(key, val)
          else:
              for (key, val) in src_dict.items():
                  _method(self, key, len(key), val)
                  if self.k:
                      self._update(key, val)
docs: Set values from dict
          Params:
              <dict <str> <int>> src_dict