def get_html_attrs(attrs):
 def _massage_attribute(value):
  if isinstance(value, (list, tuple)):
   return join_css_classes(value)
  return value
 attrs = dict(((key, _massage_attribute(value)) for (key, value) in six.iteritems(attrs) if (key and value)))
 return flatatt(attrs)

def get_html_attrs ( attrs ) : def _massage_attribute ( value ) : if isinstance ( value , ( list , tuple ) ) : return join_css_classes ( value ) return value attrs = dict ( ( ( key , _massage_attribute ( value ) ) for ( key , value ) in six . iteritems ( attrs ) if ( key and value ) ) ) return flatatt ( attrs )
flatten a dict into html attributes .