Check if the member represents an attribute and extracts the name
325723
function (member) {
        if ("[" !== member.charAt(0) || "]" !== member.charAt(member.length - 1)) {
            return "";
        }
        return _gpfEncodeAttributeMember(member.substr(1, member.length - 2)); // Extract & encode member name
    }
1254
function getAttributeNameValue(node, at) {
	const name = at.name;
	let atnv;

	if (name.indexOf('href') !== -1 || name.indexOf('src') !== -1) {
		let friendly = axe.utils.getFriendlyUriEnd(node.getAttribute(name));
		if (friendly) {
			let value = encodeURI(friendly);
			if (value) {
				atnv = escapeSelector(at.name) + '$="' + escapeSelector(value) + '"';
			} else {
				return;
			}
		} else {
			atnv =
				escapeSelector(at.name) +
				'="' +
				escapeSelector(node.getAttribute(name)) +
				'"';
		}
	} else {
		atnv = escapeSelector(name) + '="' + escapeSelector(at.value) + '"';
	}
	return atnv;
}
568751
def attr_name(self):
        ""
        return self.schema.name if self.schema else self.field.name
480245
def is_attr_selected(attr_name,     # type: str
                     include=None,  # type: Union[str, Tuple[str]]
                     exclude=None   # type: Union[str, Tuple[str]]
                     ):
    """"""

    if include is not None and exclude is not None:
        raise ValueError('Only one of \'include\' or \'exclude\' argument should be provided.')

    # win time by not doing this
    # check_var(include, var_name='include', var_types=[str, tuple], enforce_not_none=False)
    # check_var(exclude, var_name='exclude', var_types=[str, tuple], enforce_not_none=False)

    if attr_name is 'self':
        return False
    if exclude and attr_name in exclude:
        return False
    if not include or attr_name in include:
        return True
    else:
        return False
785022
def get_dim_name(arr, names):
    """"""
    for name in names:
        # TODO: raise warning/exception when multiple names arr attrs.
        if hasattr(arr, name):
            return name
    raise AttributeError("No attributes of the object `{0}` match the "
                         "specified names of `{1}`".format(arr, names))
316917
def attribute?(attr)
      return false unless container.key?(key_as_sym(attr))
      ![ "", " ", nil, [],[""], [" "], self.class.new({}), [[]]].any? {|a| a == container[key_as_sym(attr)] }
    end
119020
def _listAttrGroupMembers(self, attrGroup):
        
        from inspect import getmembers, ismethod
        methods = getmembers(self, ismethod)
        group_prefix = attrGroup + '_'
        group_len = len(group_prefix)
        group_members = [method[0][group_len:]
                         for method in methods
                         if method[0].startswith(group_prefix)]
        return group_members
11110
def _get_members_of_type(obj, member_type):
    

    if not issubclass(type(obj), ModelBase):
        obj = obj.__class__

    key_hash = []
    for key in dir(obj):
        try:
            attr = getattr(obj, key)
        except AttributeError as e:
            try:
                attr = obj.__dict__[key]
            except KeyError:
                raise AttributeError(INTROSPECTION_ERROR % (e, obj, member_type))

        if type(attr) is member_type:
            key_hash.append((key, attr))

    return key_hash
778028
def _get_members(
        mod, typ=None, include_imported=False, out_format='names',
        in_list=None, known_refs=None):
    
    roles = {'function': 'func', 'module': 'mod', 'class': 'class',
             'exception': 'exc', 'data': 'data'}
    # not included, because they cannot occur at modul level:
    #   'method': 'meth', 'attribute': 'attr', 'instanceattribute': 'attr'

    out_formats = ['names', 'fullnames', 'refs', 'table']
    if out_format not in out_formats:
        raise ValueError("out_format %s not in %r" % (out_format, out_formats))

    def check_typ(typ, mod, member):
        """Check if mod.member is of the desired typ"""
        if inspect.ismodule(member):
            return False
        documenter = _get_documenter(APP, member, mod)
        if typ is None:
            return True
        if typ == getattr(documenter, 'objtype', None):
            return True
        if hasattr(documenter, 'directivetype'):
            return roles[typ] == getattr(documenter, 'directivetype')

    def is_local(mod, member, name):
        """Check whether mod.member is defined locally in module mod"""
        if hasattr(member, '__module__'):
            return getattr(member, '__module__') == mod.__name__
        else:
            # we take missing __module__ to mean the member is a data object
            # it is recommended to filter data by e.g. __all__
            return True

    if typ is not None and typ not in roles:
        raise ValueError("typ must be None or one of %s"
                         % str(list(roles.keys())))
    items = []
    public = []
    if known_refs is None:
        known_refs = {}
    elif isinstance(known_refs, str):
        known_refs = getattr(mod, known_refs)
    if in_list is not None:
        try:
            in_list = getattr(mod, in_list)
        except AttributeError:
            in_list = []
    for name in dir(mod):
        if name.startswith('__'):
            continue
        try:
            member = safe_getattr(mod, name)
        except AttributeError:
            continue
        if check_typ(typ, mod, member):
            if in_list is not None:
                if name not in in_list:
                    continue
            if not (include_imported or is_local(mod, member, name)):
                continue
            if out_format in ['table', 'refs']:
                documenter = _get_documenter(APP, member, mod)
                role = roles.get(documenter.objtype, 'obj')
                ref = _get_member_ref_str(
                        name, obj=member, role=role,
                        known_refs=known_refs)
            if out_format == 'table':
                docsummary = extract_summary(member)
                items.append((ref, docsummary))
                if not name.startswith('_'):
                    public.append((ref, docsummary))
            elif out_format == 'refs':
                items.append(ref)
                if not name.startswith('_'):
                    public.append(ref)
            elif out_format == 'fullnames':
                fullname = _get_fullname(name, obj=member)
                items.append(fullname)
                if not name.startswith('_'):
                    public.append(fullname)
            else:
                assert out_format == 'names', str(out_format)
                items.append(name)
                if not name.startswith('_'):
                    public.append(name)
    if out_format == 'table':
        return _assemble_table(public), _assemble_table(items)
    else:
        return public, items
882456
def attr(cls, iterable, attr_name):
    

    return cls(getattr(x, attr_name) for x in iterable)
761707
def extract_attribute(module_name, attribute_name):
    """"""
    with open('%s/__init__.py' % module_name) as input_file:
        for line in input_file:
            if line.startswith(attribute_name):
                return ast.literal_eval(line.split('=')[1].strip())
97802
def hasAttribute(self, attrName):
        '''
            
        '''
        attrName = attrName.lower()

        # Check if requested attribute is present on this node
        return bool(attrName in self._attributes)
580654
def has_attribute(self, name, alias=False):
        """"""
        prop_dict = merge_dicts(self.__attributes__,
                                self.__fields__,
                                self.__relations__)
        if alias:
            prop_dict.update({v.alias : v for v in prop_dict.values() if v.alias is not None})
        
        return name in prop_dict
1334738
function(attr) {
                    var value;
                    // Handles the case of a key having a `.` in its name
                    if (typeof attr === 'string' && !! ~attr.indexOf('.')) {
                        // Attempt to get the value
                        value = this.__get(attr);
                        // For keys with a `.` in them, value will be defined
                        if (value !== undefined) {
                            return value;
                        }
                    }

                    // Otherwise we have to dig deeper into the Map to get the value.
                    // First, break up the attr (`"foo.bar"`) into parts like `["foo","bar"]`.
                    var parts = can.Map.helpers.attrParts(attr),
                        // Then get the value of the first attr name (`"foo"`).
                        current = this.__get(parts.shift());
                    // If there are other attributes to read...
                    return parts.length ?
                    // and current has a value...
                    current ?
                    // then lookup the remaining attrs on current
                    current._get(parts) :
                    // or if there's no current, return undefined.
                    undefined :
                    // If there are no more parts, return current.
                    current;
                }
445332
def inspect
      attributes = members.map do |field|
        value = self[field]
        value = "\"#{value}\"" if value.is_a?(String)

        [field, value].join('=')
      end.join(', ')

      "#<Row #{attributes}>"
    end
1217513
def get_property_name_from_attribute_name(attribute):
        
        if isinstance(attribute, str) or isinstance(attribute, unicode):
            attribute_name = attribute
        elif hasattr(attribute, 'Name'):
            attribute_name = attribute.Name
        else:
            raise Exception('Attribute type {0} is not supported'.format(str(type(attribute))))

        return attribute_name.lower().replace(' ', '_')
1141728
function extractAttribs( def ) {
    var key, val, attribs = { standard: {}, special: {}, implicit: [] };
    for ( key in def ) {
        val = def[ key ];
        if ( RX_INTEGER.test( key ) ) {
            attribs.implicit.push( val );
        } else if ( RX_STD_ATT.test( key ) ) {
            attribs.standard[ key ] = val;
        } else {
            attribs.special[ key ] = val;
        }
    }
    return attribs;
}