def visitDynamicAttributes(self, attrs):
        classes = []
        params = []
        for attr in attrs:
            if attr['name'] == 'class':
                value = self._get_value(attr)
                if isinstance(value, list):
                    classes.extend(value)
                else:
                    classes.append(value)
            else:
                value = self._get_value(attr)

                if value not in (None,False):
                    params.append((attr['name'], value))
        if classes:
            classes = [unicode(c) for c in classes]
            params.append(('class', " ".join(classes)))
        if params:
            self.buf.append(" "+" ".join([process_param(k, v, self.terse) for (k,v) in params]))
dataset/ETHPy150Open glennyonemitsu/MarkupHiveSDK/pyjade/ext/html.py/HTMLCompiler.visitDynamicAttributes/original