Creates a setter that will set the specified model attribute
    to the current value.
    @param attr_name: the name of an attribute belonging to the model.
    @type attr_name: str
425117
def model_attr(attr_name):
    

    def model_attr(value, context, **_params):
        setattr(context["model"], attr_name, value)
        return _attr()

    return model_attr
299653
def model_attr(attr_name):
    

    def model_attr(_value, context, **_params):
        value = getattr(context["model"], attr_name)
        return _attr(value)

    return model_attr
234139
public void setAttr(String attr) {
		String[] list = attr.split(";");
		for (int i = 0; i < list.length; ++i) {
			String[] val = list[i].split("=");
			if (val.length != 2)
				return ;
			getElement().setAttribute(val[0].trim(), val[1].trim());
		}
	}
609404
def values(self):
        
        if not hasattr(self, VALUES_ATTR_NAME):
            setattr(self, VALUES_ATTR_NAME, {})
        return getattr(self, VALUES_ATTR_NAME)
760340
public void setAttribute(ObjectName name, String attrName, Object value) throws Exception {
		checkClientConnected();
		Attribute attribute = new Attribute(attrName, value);
		mbeanConn.setAttribute(name, attribute);
	}
200436
public function setAttribute( $attr, $val )
    {
        $def = $this->definition();
        $fields = $def["fields"];
        $functions = isset( $def["set_functions"] ) ? $def["set_functions"] : null;
        if ( isset( $fields[$attr] ) )
        {
            $attrName = $fields[$attr];
            if ( is_array( $attrName ) )
            {
                $attrName = $attrName['name'];
            }

            $oldValue = null;
            if ( isset( $this->$attrName ) )
                $oldValue = $this->$attrName;
            $this->$attrName = $val;
            if ( $oldValue === null ||
                 $oldValue !== $val )
                $this->setHasDirtyData( true );
        }
        else if ( isset( $functions[$attr] ) )
        {
            $functionName = $functions[$attr];
            $oldValue = $this->$functionName( $val );
            if ( $oldValue === null or $oldValue !== $val )
                $this->setHasDirtyData( true );
        }
        else
        {
            eZDebug::writeError( "Undefined attribute '$attr', cannot set",
                                 $def['class_name'] );
        }
    }
1371146
def set_attrs(self, **attrs):
        """"""
        commands = tuple(self.values())
        for name, value in attrs.items():
            for command in commands:
                setattr(command, name, value)
1289982
def instance_set(attribute, value)
      setter = :"#{self.name}_#{attribute}="
      self.instance.send(setter, value) if instance.respond_to?(setter)
    end
30331
def action_setattr():
    

    def action_setattr(value, context, **_params):
        setattr(context["action"], context["key"], value)
        return _attr()

    return action_setattr
990650
def set(self, name, value):
        
        attr = self.getAttribute(name)
        if attr is None:
            attr = Attribute(name, value)
            self.append(attr)
        else:
            attr.setValue(value)
1238968
def _setter(self):
        
        def set_attr_value(obj, value):
            str_value = self._simple_type.to_xml(value)
            obj.set(self._clark_name, str_value)
        return set_attr_value
970736
def __attr_name(self, name):
		
		if name not in self.cookie_attr_value_compliance.keys():
			suggested_name = name.replace('_', '-').lower()
			if suggested_name not in self.cookie_attr_value_compliance.keys():
				raise ValueError('Invalid attribute name is specified')
			name = suggested_name
		return name
1187437
def set_attrs(self, username, attrs):
        
        self._check_fix_users(username)
        for attr in attrs:
            self.users[username][attr] = attrs[attr]
1051423
def set_attr(self, name, value):
    
    self.exec_script("node.setAttribute(%s, %s)" % (repr(name), repr(value)))
1277013
def _set_attr(self, **kwargs):
        
        keys = c_str_array(kwargs.keys())
        vals = c_str_array([str(s) for s in kwargs.values()])
        num_args = mx_uint(len(kwargs))
        check_call(_LIB.MXSymbolSetAttrs(
            self.handle, num_args, keys, vals))
756700
def _add_attr_property(self):
        
        property_ = property(self._getter, self._setter, None)
        # assign unconditionally to overwrite element name definition
        setattr(self._element_cls, self._prop_name, property_)
51087
public void setSessionAttr(final String attrName,
                             final Object val) {
    final HttpSession sess = request.getSession(false);

    if (sess == null) {
      return;
    }

    sess.setAttribute(attrName, val);
  }