#NEWLINE# def setAttributes( self , attributes ) : #NEWLINE# #INDENT# if ( ( attributes is not None ) and ( len ( attributes ) > 0 ) ) : #NEWLINE# #INDENT# converted_attributes = [ ] #NEWLINE# for ( name , value ) in list ( attributes . items ( ) ) : #NEWLINE# #INDENT# if isinstance ( name , tuple ) : #NEWLINE# #INDENT# new_name = NamespacedAttribute ( * name ) #NEWLINE# del attributes [ name ] #NEWLINE# attributes [ new_name ] = value #NEWLINE# #UNINDENT# #UNINDENT# self . soup . builder . _replace_cdata_list_attribute_values ( self . name , attributes ) #NEWLINE# for ( name , value ) in attributes . items ( ) : #NEWLINE# #INDENT# self . element [ name ] = value #NEWLINE# #UNINDENT# self . soup . builder . set_up_substitutions ( self . element )