Build managed property interface.

    Args:
        attr (str): Property's name

    Returns:
        property: Managed property interface
173831
def _manage_location(attr):
    
    return property(lambda self: getattr(self, '_%s' % attr),
                    lambda self, value: self._set_location(attr, value))
679521
def _import_attr_n_module(module_name, attr):
    
    __import__(module_name)
    module = sys.modules[module_name]
    attr = getattr(module, attr)
    return attr, module
1213967
function createProperty(attr) {
	var name, value, isAttr;

	// using a map to find the correct case of property name
	if (propertyMap[attr.name]) {
		name = propertyMap[attr.name];
	} else {
		name = attr.name;
	}
	// special cases for data attribute, we default to properties.attributes.data
	if (name.indexOf('data-') === 0 || name.indexOf('aria-') === 0) {
		value = attr.value;
		isAttr = true;
	} else {
		value = attr.value;
	}

	return {
		name: name
		, value: value
		, isAttr: isAttr || false
	};
}
425117
def model_attr(attr_name):
    

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

    return model_attr
658048
def to_format(self, attr):
        
        try:
            _attr = self._to[attr]
        except KeyError:
            try:
                _attr = self._to[attr.lower()]
            except:
                _attr = ''

        if _attr:
            return factory(saml.Attribute,
                           name=_attr,
                           name_format=self.name_format,
                           friendly_name=attr)
        else:
            return factory(saml.Attribute, name=attr)
1011684
def do_attr(environment, obj, name):
    
    try:
        name = str(name)
    except UnicodeError:
        pass
    else:
        try:
            value = getattr(obj, name)
        except AttributeError:
            pass
        else:
            if environment.sandboxed and not \
               environment.is_safe_attribute(obj, name, value):
                return environment.unsafe_undefined(obj, name)
            return value
    return environment.undefined(obj=obj, name=name)
502779
def update_attr(self, attr):
        
        changed_attr = []
        for key, value in attr.items():
            if value is None:
                continue
            if getattr(self, "_{0}".format(key), None) != value:
                changed_attr.append(key)
                self.__setattr__("_{0}".format(key), value)
                _LOGGER.debug('%s: update %s with %s', self.name, key, value)
        return changed_attr
315581
def _object_with_attr(self, name):
        
        for obj in self._objects:
            if hasattr(obj, name):
                return obj

        raise AttributeError("No object has attribute {!r}".format(name))
1200894
def has_own_property(self, attr):
        
        try:
            object.__getattribute__(self, attr)
        except AttributeError:
            return False
        else:
            return True
627885
def put_attributes(self, attrs):
        
        assert(isinstance(attrs, dict)), "Argument must be a dict of key->values to save"
        for prop_name in attrs:
            value = attrs[prop_name]
            prop = self.find_property(prop_name)
            assert(prop), "Property not found: %s" % prop_name
            self._manager.set_property(prop, self, prop_name, value)
        self.reload()
        return self
1255620
protected static function _buildAttr($attr, $value = '')
    {
        if (\is_string($attr)) {

            if (\is_bool($value)) {
                $value = $value ? 'true' : 'false';
            }

            return "{$attr}=\"{$value}\"";
        }

        if (\is_array($attr)) {
            $attrs = [];

            foreach ($attr as $name => $val) {
                $attrs[] = static::_buildAttr($name, $val);
            }

            return implode(' ', $attrs);
        }

        return '';
    }
824453
def get_attr(self, method_name):
        """"""
        return self.attrs.get(method_name) or self.get_callable_attr(method_name)
587248
public synchronized void insert_attr(int attr)
	{

//
// Insert elt in the box
//

		box[insert_elt].req_type = Req_Attribute;
		box[insert_elt].attr_type = attr;
		box[insert_elt].op_type = Op_Unknown;
		box[insert_elt].when = new Date();

//
// get client address
//

		get_client_host();
			
//
// manage insert and read indexes
//

		inc_indexes();
	}
785459
def attr(aid):
    '''
    
    '''
    def _attr(ctx):
        return ctx.current_link[ATTRIBUTES].get(aid)
    return _attr
1243466
def get_attr(name):
    
    i = name.rfind('.')
    cls = str(name[i+1:])
    module = str(name[:i])

    mod = __import__(module, fromlist=[cls])
    return getattr(mod, cls)
387963
def get_attr(item, name, default=None):
    '''  '''
    try:
        val = item[name]
    except (KeyError, TypeError):
        try:
            val = getattr(item, name)
        except AttributeError:
            val = default
    return val
213891
function(attr) {
      var startIndex, newAttr,
        i = 0,
        hasEndBracket = true;
      startIndex = attr.indexOf('[', i);
      if (startIndex < 0) {
        return attr;
      }
      newAttr = attr.substring(0, startIndex + 1);
      while (startIndex > 0 && hasEndBracket) {
         i = attr.indexOf(']', i) + 1;
         hasEndBracket = i > 0;
         startIndex = attr.indexOf('[', i);
         if (startIndex > 0) {
           newAttr = newAttr + attr.substring(i - 1, startIndex + 1);
         }
      }
      newAttr = newAttr + attr.substring(i - 1);
      return newAttr;
    }