Set an attribute path, as defined by a string separated by '__'.
    setattr_path(foo, 'a__b__c', value) is equivalent to "foo.a.b.c = value".
776756
def setattr_path(obj, path, value):
    
    path = path.split('__')
    o = obj
    for name in path[:-1]:
        o = getattr(o, name)
    setattr(o, path[-1], value)
    return obj
370843
function _set(obj, path, value) {
  var subpathes = path.split('.');
  while (subpathes.length - 1) {
    obj = obj[subpathes.shift()];
  }
  obj[subpathes.shift()] = value;
}
784
def setattrdeep(obj, attr, val):
    ''
    attrs = attr.split('.')

    for a in attrs[:-1]:
        obj = getattr(obj, a)
    setattr(obj, attrs[-1], val)
1051423
def set_attr(self, name, value):
    
    self.exec_script("node.setAttribute(%s, %s)" % (repr(name), repr(value)))
844612
def AddAttributePath(self, **_):
    """"""
    attribute_path = self.current_expression.attribute
    if not attribute_path:
      attribute_path = []

    attribute_path.append(self.string)
    self.current_expression.SetAttribute(attribute_path)
128640
function set(srcObj, pathStr, value) {
      function setBase(origin, srcObj, pathStr, value) {
        if (!srcObj || !isStr(pathStr)) return origin;
        var paths = getPaths(pathStr), prop = paths.shift();
        if (!prop) return origin;
        if (paths.length) {
          if (!typeVal(srcObj[prop], 'object', 'fun')) return origin;
          return setBase(origin, srcObj[prop], paths.join('/'), value);
        } else {
          srcObj[prop] = value;
          return origin;
        }
      }
      return setBase(srcObj, srcObj, pathStr, value);
    }
409013
def _set_attribute(self, name, value):
        """"""
        setattr(self, name, value)
        self.namespace.update({name: getattr(self, name)})
97275
public static final void setDoubleAttribute(Path path, String attribute, double value, LinkOption... options) throws IOException
    {
        attribute = attribute.startsWith("user:") ? attribute : "user:"+attribute;
        Files.setAttribute(path, attribute, Primitives.writeDouble(value), options);
    }
784208
function setAttr(dom, name, val) {
  var xlink = XLINK_REGEX.exec(name);
  if (xlink && xlink[1])
    { dom.setAttributeNS(XLINK_NS, xlink[1], val); }
  else
    { dom.setAttribute(name, val); }
}
950816
def _set_relative_pythonpath(self, value):
        """"""
        self.pythonpath = [osp.abspath(osp.join(self.root_path, path))
                           for path in value]
264142
def mock_attr(self, *args, **kwargs):
        
        self.path.extend(args)
        self.qs.update(kwargs)
        return self
722038
def _setAttr(self, attr, value):
        
        meth = "_set_%s" % attr
        if not hasattr(self, meth):
            raise AttributeError("No setter for attribute '%s'." % attr)
        meth = getattr(self, meth)
        meth(value)
230078
def set_nested_attribute(obj, attribute, value):
    
    parent, attr = resolve_nested_attribute(obj, attribute)
    if parent is None:
        raise AttributeError('Can not set attribute "%s" on None value.'
                             % attr)
    setattr(parent, attr, value)
1085125
def set_attr(obj, path, value):
    
    try:
        return _set_attr(obj, split_field(path), value)
    except Exception as e:
        Log = get_logger()
        if PATH_NOT_FOUND in e:
            Log.warning(PATH_NOT_FOUND + ": {{path}}", path=path, cause=e)
        else:
            Log.error("Problem setting value", cause=e)
824353
public void setAttributes(String path, SftpFileAttributes attrs)
			throws SftpStatusException, SshException {
		try {
			UnsignedInteger32 requestId = nextRequestId();

			Packet msg = createPacket();
			msg.write(SSH_FXP_SETSTAT);
			msg.writeInt(requestId.longValue());
			msg.writeString(path, CHARSET_ENCODING);
			msg.write(attrs.toByteArray());

			sendMessage(msg);

			getOKRequestStatus(requestId);
		} catch (SshIOException ex) {
			throw ex.getRealException();
		} catch (IOException ex) {
			throw new SshException(ex, SshException.INTERNAL_ERROR);
		}
	}
480629
def set_attributes(self, **attributes_dict):
        
        for attr_name, attr_value in attributes_dict.items():
            self.set_attr(attr_name, attr_value)
        return self
1145163
def set_path(self, data, path, value):
        
        self.say('set_path:value:' + str(value) +
                 ' at:' + str(path) + ' in:' + str(data))

        if isinstance(path, str):
            path = path.split('.')
        if len(path) > 1:
            self.set_path(data.setdefault(path[0], {}), path[1:], value)
        else:
            data[path[0]] = value
        return data