#NEWLINE# def handle_endtag( self , tag ) : #NEWLINE# #INDENT# if ( not self . open_tags ) : #NEWLINE# #INDENT# self . error ( ( 'Unexpected end tag `%s` (%s)' % ( tag , self . format_position ( ) ) ) ) #NEWLINE# #UNINDENT# element = self . open_tags . pop ( ) #NEWLINE# while ( element . name != tag ) : #NEWLINE# #INDENT# if ( not self . open_tags ) : #NEWLINE# #INDENT# self . error ( ( 'Unexpected end tag `%s` (%s)' % ( tag , self . format_position ( ) ) ) ) #NEWLINE# #UNINDENT# element = self . open_tags . pop ( )