Return the boolean value of the attribute having *attr_name*, or
        |False| if not present.
329354
def bool_prop(self, attr_name):
        
        value = getattr(self, attr_name)
        if value is None:
            return False
        return value
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
824453
def get_attr(self, method_name):
        """"""
        return self.attrs.get(method_name) or self.get_callable_attr(method_name)
361625
function getAttribute(node, attrName) {
	attrName = attrName.toLowerCase();
	return node && node.open.attributes.find(attr => attr.name.value.toLowerCase() === attrName);
}
969338
def get(self, name, strict=True):
        """"""
        if not isinstance(name, str) or name.startswith('_'):
            raise AttributeError(self.__class__.__name__, name)
        elif strict and name not in self._possible_attributes:
            raise AttributeError('%s is not a valid attribute of %r.' %
                                 (name, self))
        elif name in self._attributes:
            return self._attributes[name]
        else:
            raise exceptions.AttributeNotProvided(name)
1048284
def check_attribute_mapping_exists(resource_attr_id_source, resource_attr_id_target, **kwargs):
    
    qry = db.DBSession.query(ResourceAttrMap).filter(
                ResourceAttrMap.resource_attr_id_a == resource_attr_id_source,
                ResourceAttrMap.resource_attr_id_b == resource_attr_id_target).all()

    if len(qry) > 0:
        return 'Y'
    else:
        return 'N'
1349212
def _has_attr(cls, ds, attr, concept_name, priority=BaseCheck.HIGH):
        
        val = cls.std_check(ds, attr)
        msgs = []

        if not val:
            msgs.append("Attr '{}' (IOOS concept: '{}') not found in dataset".format(attr, concept_name))

        return Result(priority, val, concept_name, msgs)
88857
def hasAttr(self, node, name, nsuri=None):
        """"""
        if nsuri is None:
            if node.hasAttribute(name):
                return True
            return False
        return node.hasAttributeNS(nsuri, name)
1336500
public static Boolean getAttributeBoolean(Tag tag, String attrName) throws EvaluatorException {
	Boolean b = getAttributeLiteral(tag, attrName).getBoolean(null);
	if (b == null) throw new EvaluatorException("attribute [" + attrName + "] must be a constant boolean value");
	return b;
    }
347613
def get_rel_attr(self, attr_name, model):
        
        rel_attr_name, attr_name = attr_name.split(".", 1)
        rel_attr = getattr(self.model, rel_attr_name, None)
        rel_model = None
        attr = None

        if rel_attr is not None:
            rel_model = rel_attr.property.mapper.class_
            attr = getattr(rel_model, attr_name, None)

        return rel_model, attr
233081
function _attr(el, attr, attrs, i) {
        var result = (el.getAttribute && el.getAttribute(attr)) || 0;

        if (!result) {
            attrs = el.attributes;

            for (i = 0; i < attrs.length; ++i) {
                if (attrs[i].nodeName === attr) {
                    return attrs[i].nodeValue;
                }
            }
        }

        return result;
    }
1353592
def get_attr(self, symbol, attrname):
        
        return symbol.extension_attributes.get(self.extension_name, {}).get(
            attrname, None)
1083862
def _checkAttribs(self, strict):
        """"""
        if self.choice:
            warning("Choice values not allowed for real-type parameter " +
                    self.name, strict)
            self.choice = None
904125
def check_attr(self, pos, attrs):
        """"""

        for at in attrs:
            (ns, local_name) = self.split_qname(at)
            if ns is None:
                error.err_add(self.ctx.errors, pos,
                              'UNEXPECTED_ATTRIBUTE', local_name)
            elif ns == yin_namespace:
                error.err_add(self.ctx.errors, pos,
                              'UNEXPECTED_ATTRIBUTE', "{"+at)
639104
def _getAttr(self, attr):
        
        meth = "_get_%s" % attr
        if not hasattr(self, meth):
            raise AttributeError("No getter for attribute '%s'." % attr)
        meth = getattr(self, meth)
        value = meth()
        return value
389967
def boolean(attr, metadata={})
      add_attribute(attr, :boolean, metadata)
      define_method("#{attr}=") do |arg|
        v = case arg
        when String then BOOLEAN_TRUE_STRINGS.include?(arg.downcase)
        when Numeric then arg == 1
        when nil then nil
        else !!arg
        end
        instance_variable_set("@#{attr}", v)
      end
      alias_method "#{attr}?", attr
    end
488300
def hasattr(self, attr, ns=None):
        
        if not self.__attributes:
            self.setAttributeDictionary()
        if ns:
            return self.__attributes.get(ns,{}).has_key(attr)
        return self.__attributes.has_key(attr)