Retrieves an attribute set in the Mash. Will convert
 any key passed in to a string before retrieving.
550005
def custom_reader(key)
      default_proc.call(self, key) if default_proc && !key?(key)
      value = regular_reader(convert_key(key))
      yield value if block_given?
      value
    end
556148
def getAttribute(self):
        """"""
        data = self.data
        # Step 1 (skip chars)
        c = data.skip(spaceCharactersBytes | frozenset([b"/"]))
        assert c is None or len(c) == 1
        # Step 2
        if c in (b">", None):
            return None
        # Step 3
        attrName = []
        attrValue = []
        # Step 4 attribute name
        while True:
            if c == b"=" and attrName:
                break
            elif c in spaceCharactersBytes:
                # Step 6!
                c = data.skip()
                break
            elif c in (b"/", b">"):
                return b"".join(attrName), b""
            elif c in asciiUppercaseBytes:
                attrName.append(c.lower())
            elif c is None:
                return None
            else:
                attrName.append(c)
            # Step 5
            c = next(data)
        # Step 7
        if c != b"=":
            data.previous()
            return b"".join(attrName), b""
        # Step 8
        next(data)
        # Step 9
        c = data.skip()
        # Step 10
        if c in (b"'", b'"'):
            # 10.1
            quoteChar = c
            while True:
                # 10.2
                c = next(data)
                # 10.3
                if c == quoteChar:
                    next(data)
                    return b"".join(attrName), b"".join(attrValue)
                # 10.4
                elif c in asciiUppercaseBytes:
                    attrValue.append(c.lower())
                # 10.5
                else:
                    attrValue.append(c)
        elif c == b">":
            return b"".join(attrName), b""
        elif c in asciiUppercaseBytes:
            attrValue.append(c.lower())
        elif c is None:
            return None
        else:
            attrValue.append(c)
        # Step 11
        while True:
            c = next(data)
            if c in spacesAngleBrackets:
                return b"".join(attrName), b"".join(attrValue)
            elif c in asciiUppercaseBytes:
                attrValue.append(c.lower())
            elif c is None:
                return None
            else:
                attrValue.append(c)
753316
private static AttributeKey getAttributeKey(final String schemaArn, final String facetName, final String attributeName) {
        return new AttributeKey().withFacetName(facetName).withSchemaArn(schemaArn).withName(attributeName);
    }
609539
def _attributeStr(self, name):
        
        return "{}={}".format(
            _encodeAttr(name),
            ",".join([_encodeAttr(v) for v in self.attributes[name]]))
587482
def get_dotted(self, key):
        
        parts = key.split('.')
        cobj = self
        for attr in parts:
            cobj = getattr(cobj, attr)
        return cobj
283838
public static Object getAttribute(String key) {
		Object value = localAttributeHolder.get().get(key);
		if(value == null) {
			value = inheritableAttributeHolder.get().get(key);
		}
		return value;
	}
121976
def get_attribute_by_repr(self, attribute_repr_name, mapped_class=None,
                              key=None):
        
        attr_map = self.__get_attribute_map(mapped_class, key, 1)
        try:
            return attr_map[attribute_repr_name]
        except KeyError:
            raise AttributeError(attribute_repr_name)
929141
def get(self, name):
        
        # read the attribute
        attr = getattr(self.context, name, None)
        if callable(attr):
            return attr()
        return attr
948035
def getattr(self, key):
		
		if key in _MethodFactoryMeta[self.classId]:
			""" property exists """
			return self.__dict__[key]
		else:
			""" property does not exist """
			return None
248841
def getattr(self, key):
		
		if ((key == "classId") and (self.__dict__.has_key(key))):
			return self.__dict__[key]

		if UcsUtils.FindClassIdInMoMetaIgnoreCase(self.classId):
			if self.__dict__.has_key(key):
				if key in _ManagedObjectMeta[self.classId]:
					""" property exists """
					return self.__dict__[key]
			else:
				if self.__dict__.has_key('XtraProperty'):
					if self.__dict__['XtraProperty'].has_key(key):
						return self.__dict__['XtraProperty'][UcsUtils.WordU(key)]
					else:
						raise AttributeError(key)
				else:
					# TODO: Add Warning/Error messages in Logger.
					print "No XtraProperty in mo:", self.classId, " key:", key
		else:
			""" property does not exist """
			if self.__dict__['XtraProperty'].has_key(key):
				return self.__dict__['XtraProperty'][UcsUtils.WordU(key)]
			elif key == "Dn" or key == "Rn":
				return None
			else:
				raise AttributeError(key)
834479
def _imm_init_getattribute(self, name):
    '''
    
    '''
    values = _imm_value_data(self)
    params = _imm_param_data(self)
    if name in values:
        _imm_init_to_trans(self)
        return getattr(self, name)
    elif name in params:
        dd = object.__getattribute__(self, '__dict__')
        if name in dd: return dd[name]
        else: raise RuntimeError('Required immutable parameter %s requested before set' % name)
    else:
        # if they request a required param before it's set, raise an exception; that's fine
        return object.__getattribute__(self, name)
559225
def parse_attribute
      ns_id, name_id, val_str_id, flags, val = @io.read(4*5).unpack("V*")
      key = @strings[name_id]
      unless ns_id == 0xFFFFFFFF
        ns = @strings[ns_id] 
        prefix = ns.sub(/.*\//,'')
        unless @ns.include? ns
          @ns << ns
          @doc.root.add_namespace(prefix, ns)
        end
        key = "#{prefix}:#{key}"
      end
      value = convert_value(val_str_id, flags, val)
      return key, value
    end
464826
def get_attribute(instance, attrs):
    
    for attr in attrs:
        if instance is None:
            # Break out early if we get `None` at any point in a nested lookup.
            return None
        try:
            if isinstance(instance, collections.Mapping):
                instance = instance[attr]
            else:
                instance = getattr(instance, attr)
        except ObjectDoesNotExist:
            return None
        if is_simple_callable(instance):
            try:
                instance = instance()
            except (AttributeError, KeyError) as exc:
                # If we raised an Attribute or KeyError here it'd get treated
                # as an omitted field in `Field.get_attribute()`. Instead we
                # raise a ValueError to ensure the exception is not masked.
                raise ValueError('Exception raised in callable attribute "{0}"; original exception was: {1}'.format(attr, exc))

    return instance
1166624
private Attributes toAttributes(Map<String,String> attrs){
        AttributesImpl impl = new AttributesImpl();
        for (Map.Entry<String,String> attr : attrs.entrySet()){
        	impl.addAttribute("", attr.getKey(), "", "CDATA", attr.getValue());
        }
        return impl;
    }
189989
def get(self, key, default_val=None, require_value=False):
        
        val = dict.get(self, key, default_val)
        if val is None and require_value:
            raise KeyError('key "%s" not found' % key)
        if isinstance(val, dict):
            return AttributeDict(val)
        return val
643958
function(key, args, fallbackString) {
            var index = key.lastIndexOf(".");
            var prop = gTextProp;
            if (index > 0) {
                // An attribute has been specified
                prop = key.substr(index + 1);
                key = key.substring(0, index);
            }
            var fallback;
            if (fallbackString) {
                fallback = {};
                fallback[prop] = fallbackString;
            }
            var data = getL10nData(key, args, fallback);
            if (data && prop in data) {
                return data[prop];
            }
            return "{{" + key + "}}";
        }
1057336
def get_attr(obj, string_rep, default=_get_attr_raise_on_attribute_error, separator="."):
    
    attribute_chain = string_rep.split(separator)

    current_obj = obj

    for attr in attribute_chain:
        try:
            current_obj = getattr(current_obj, attr)
        except AttributeError:
            if default is _get_attr_raise_on_attribute_error:
                raise AttributeError(
                    "Bad attribute \"{}\" in chain: \"{}\"".format(attr, string_rep)
                )
            return default

    return current_obj