#NEWLINE# def maprange( self ) : #NEWLINE# #INDENT# lowindex = 0 #NEWLINE# for index in xrange ( len ( self . charmap ) ) : #NEWLINE# #INDENT# if ( index != 0 ) : #NEWLINE# #INDENT# if ( ( self . charmap [ index ] - 1 ) == self . charmap [ ( index - 1 ) ] ) : #NEWLINE# #INDENT# pass #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# highindex = ( index - 1 ) #NEWLINE# self . charrange . append ( ( self . charmap [ lowindex ] , ( self . charmap [ index ] + 1 ) ) ) #NEWLINE# lowindex = index #NEWLINE# #UNINDENT# #UNINDENT# if ( index == ( len ( self . charmap ) - 1 ) ) : #NEWLINE# #INDENT# highindex = index #NEWLINE# self . charrange . append ( ( self . charmap [ lowindex ] , self . charmap [ highindex ] ) )