Force a new value to be generated for the dynamic attribute
        name, and return it.

        If name is not dynamic, its current value is returned
        (i.e. equivalent to getattr(name).
967794
def force_new_dynamic_value(self_, name): # pylint: disable-msg=E0213
        
        cls_or_slf = self_.self_or_cls
        param_obj = cls_or_slf.param.objects('existing').get(name)

        if not param_obj:
            return getattr(cls_or_slf, name)

        cls, slf = None, None
        if isinstance(cls_or_slf,type):
            cls = cls_or_slf
        else:
            slf = cls_or_slf

        if not hasattr(param_obj,'_force'):
            return param_obj.__get__(slf, cls)
        else:
            return param_obj._force(slf, cls)
1276262
public Object getAttribute(String name) {
        Object value = getLocalAttribute(name);
        if (value == null && parent != null) {
            value = parent.getAttribute(name);
        }
        return value;
    }
69031
function attribute(element, name, val) {
  return supports.attributes || !supports.html
  ? element.getAttribute(name)
  : (val = element.getAttributeNode(name)) && val.specified ? val.value : '';
}
724558
def setattr(self, attr, new_value, close_the_changeset=True):
        """"""
        existing_value = getattr(self, attr, None)
        if existing_value != new_value:
            setattr(self, attr, new_value)
            self._changeset[attr] = new_value

        if close_the_changeset and self._changeset:
            self._call_callbacks()
254992
static String getAttributeValue(Element element, String name) {
        Attr attribute = element.getAttributeNode(name);
        if (attribute == null) {
            return null;
        } else {
            return attribute.getValue();
        }
    }
505451
def _resolve_value(self, name):
        
        name = str(name)
        if name in self._metadata._meta.elements:
            element = self._metadata._meta.elements[name]

            # Look in instances for an explicit value
            if element.editable:
                value = getattr(self, name)
                if value:
                    return value

            # Otherwise, return an appropriate default value (populate_from)
            populate_from = element.populate_from
            if isinstance(populate_from, collections.Callable):
                return populate_from(self, **self._populate_from_kwargs())
            elif isinstance(populate_from, Literal):
                return populate_from.value
            elif populate_from is not NotSet:
                return self._resolve_value(populate_from)

        # If this is not an element, look for an attribute on metadata
        try:
            value = getattr(self._metadata, name)
        except AttributeError:
            pass
        else:
            if isinstance(value, collections.Callable):
                if getattr(value, '__self__', None):
                    return value(self)
                else:
                    return value(self._metadata, obj=self)
            return value
253893
@Pure
	protected Attribute getStoredAttribute(String name, AttributeType expectedType) {
		Object val = this.heap.get(name);
		if (val != null) {
			final AttributeType currentType = AttributeType.fromValue(val);
			val = unprotectNull(val);
			final Attribute attr = new AttributeImpl(name);
			if (expectedType == null) {
				attr.castAndSet(currentType, val);
			} else {
				attr.castAndSet(expectedType, val);
			}
			return attr;
		}
		return null;
	}
653336
def getAttributeName(self, name):
        '''
        '''
        if self.func_aname is None:
            return name
        assert callable(self.func_aname), \
            'expecting callable method for attribute func_aname, not %s' %type(self.func_aname)
        f = self.func_aname
        return f(name)
204851
public void setDynamicValue(String attribute, String value) {

        if (null == m_dynamicValues) {
            m_dynamicValues = new ConcurrentHashMap<String, String>();
        }
        m_dynamicValues.put(attribute, value);
    }
995145
private Object generateValue(MethodSymbol meth, Attribute attr) {
        ValueVisitor vv = new ValueVisitor(meth);
        return vv.getValue(attr);
    }
324108
function attr(name, value) {
    var self = this;
    if (arguments.length === 0) {
      return self._attrs;
    }
    if (Util.isObject(name)) {
      // self._attrs = Util.deepMix(self._attrs, name);
      for (var k in name) {
        this._setAttr(k, name[k]);
      }
      self.clearBBox();
      this._cfg.hasUpdate = true;
      return self;
    }
    if (arguments.length === 2) {
      this._setAttr(name, value);
      self.clearBBox();
      this._cfg.hasUpdate = true;
      return self;
    }
    return self._attrs[name];
  }
463100
def _load_get_attr(self, name):
        ''
        if self._mode in _allowed_read and self._N is None:
            self._read_header()
        return getattr(self, name)
1122179
function(name) {
    var attr = this.definition.attributes[name]

    if (attr) {
      // set undefined values to null
      if (this.attributes[name] === undefined) {
        this.attributes[name] = null
      }

      return this.definition.cast(name, this.attributes[name], 'output', this)
    }

    return null
  }
556171
def get_attribute_by_name(el, name, default=None):
        """"""

        value = default
        if el._is_xml:
            try:
                value = el.attrs[name]
            except KeyError:
                pass
        else:
            for k, v in el.attrs.items():
                if util.lower(k) == name:
                    value = v
                    break
        return value
635191
def _add_attribute(self, name, value, allowed_values=None):
        """"""
        if value and value != 'none':

            if isinstance(value, (int, bool)):
                value = str(value)

            if allowed_values and value not in allowed_values:
                raise TypeError(
                    "Attribute '" + name + "' must be one of " + str(
                        allowed_values) + " but is '" + str(value) + "'")

            self.element_attrs[name] = value
1218399
def _set(self, name, value):
        
        if value is not UNSET:
            if isinstance(value, Slotted):
                current = getattr(self, name, UNSET)
                if current is None or current is UNSET:
                    current = value.__class__()
                    current.set(value)
                    setattr(self, name, current)
                    return
                if isinstance(current, Slotted):
                    current.set(value)
                    return
            setattr(self, name, value)
99278
@Api
	public void getValue(String name, DoubleAttribute attribute) {
		attribute.setValue(toDouble(formWidget.getValue(name)));
	}