Parameters
    ----------
    attr_list : list
        A list of (keyword, value) tuple pairs
    global_attrs : tuple(list, dict)
        Global attributes which update the local attributes
322111
def get_attr(attr_list, global_attrs):
    
    local_attr = [], {}
    for kv in attr_list:
        keyword = kv[0]
        if len(kv) == 1:
            local_attr[0].append(keyword)
            continue
        elif len(kv) == 2:
            value = kv[1]
        elif len(kv) > 2:
            value = kv[1:]

        if keyword == 'tag':
            local_attr[1].setdefault(keyword, set()).add(value)
        else:
            local_attr[1][keyword] = value

    attr0 = copy.copy(global_attrs[0])
    attr1 = copy.copy(global_attrs[1])

    if local_attr[0]:
        attr0.extend(local_attr[0])

    if local_attr[1]:
        attr1.update(local_attr[1])

    return attr0, attr1
773213
def _set_attrs_to_values(self, response={}):
        
        for key in response.keys():
            setattr(self, key, response[key])
425117
def model_attr(attr_name):
    

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

    return model_attr
581856
def add(self, name, attr=None, value=None):
        ""

        if isinstance(name, tuple) or isinstance(name, list):
            name, attr, value = self.__set_iter_value(name)

        if attr is None:
            attr = name

        if value is None:
            value = attr

        self.__data += (self.get_const_string(name=name, value=value),)
        # set attribute as slugfiy
        self.__dict__[s_attr(attr)] = self.__data[-1]
609404
def values(self):
        
        if not hasattr(self, VALUES_ATTR_NAME):
            setattr(self, VALUES_ATTR_NAME, {})
        return getattr(self, VALUES_ATTR_NAME)
1325702
def attributes(self, source=None, relation=None, target=None):
        
        attrmatch = lambda a: (
            (source is None or source == a.source) and
            (relation is None or relation == a.relation) and
            (target is None or target == a.target)
        )
        variables = self.variables()
        attrs = [t for t in self.triples() if t.target not in variables]
        return list(filter(attrmatch, attrs))
368095
def set_attr(self):
        
        setattr(self.attrs, self.kind_attr, self.values)
        setattr(self.attrs, self.meta_attr, self.meta)
        if self.dtype is not None:
            setattr(self.attrs, self.dtype_attr, self.dtype)
488530
def as_list(self):
        
        if hasattr(self, 'cust_list'):
            return self.cust_list
        if hasattr(self, 'attr_check'):
            self.attr_check()
        cls_bltns = set(dir(self.__class__))
        ret = [a for a in dir(self) if a not in cls_bltns and getattr(self, a)]
        return ret
863369
def _remove_attributes(attrs, remove_list):
    
    new_attrs = {}
    for attr in attrs.keys():
        if attr not in remove_list:
            new_attrs[attr] = attrs[attr]
    return new_attrs
1277013
def _set_attr(self, **kwargs):
        
        keys = c_str_array(kwargs.keys())
        vals = c_str_array([str(s) for s in kwargs.values()])
        num_args = mx_uint(len(kwargs))
        check_call(_LIB.MXSymbolSetAttrs(
            self.handle, num_args, keys, vals))
1081226
def _attr_func_(self, slots):
        

        self.__attr_func = type(
            ''.join([type(self).__name__, 'Funcs']),
            (),
            {
                '__module__': type(self).__module__,
                '__slots__': tuple(set(slots))
            }
        )()
295705
def _attrs_to_tuple(obj, attrs):
    
    return tuple(getattr(obj, a.name) for a in attrs)
805874
def set_attrs(self):
        
        self.attrs.encoding = self.encoding
        self.attrs.errors = self.errors
275474
def attrlist(self):
        ''
        keymap = self.config.get('KEY_MAP')
        if keymap:
            # https://github.com/ContinuumIO/flask-ldap-login/issues/11
            # https://continuumsupport.zendesk.com/agent/tickets/393
            return [s.encode('utf-8') for s in keymap.values()]
        else:
            return None
989930
def view_attr(attr_name):
    

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

    return view_attr
669970
def assign(self, attrs):
        
        for k, v in attrs.items():
            setattr(self, k, v)
179336
def _get_attrs(self, names):
        
        assert isinstance(names, str)
        names = names.replace(",", " ").split(" ")
        res = []
        for n in names:
            if n == "":
                continue
            if n not in self.__dict__:
                raise KeyError("Unknown name for Container attribute: '{}'".format(n))
            res.append(getattr(self, n))
        return res