#NEWLINE# def _serialize_attributes( attributes ) : #NEWLINE# #INDENT# 'Serializes HTML element attributes in a name="value" pair form.' #NEWLINE# result = '' #NEWLINE# for ( name , value ) in attributes . items ( ) : #NEWLINE# #INDENT# if ( not value ) : #NEWLINE# #INDENT# continue #NEWLINE# #UNINDENT# result += ( ' ' + _unmangle_attribute_name ( name ) ) #NEWLINE# result += ( ( '="' + escape ( value , True ) ) + '"' ) #NEWLINE# #UNINDENT# return result