#NEWLINE# def check( self ) : #NEWLINE# #INDENT# 'Checks a new digram to figure out what to do with it.\n\n        If it appears elsewhere, deals with it by calling match(), otherwise\n        inserts it into the hash table.\n        ' #NEWLINE# if isinstance ( self . n , Guard ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( self . digram ( ) not in digrams ) : #NEWLINE# #INDENT# digrams [ self . digram ( ) ] = self #NEWLINE# return False #NEWLINE# #UNINDENT# found = digrams [ self . digram ( ) ] #NEWLINE# if ( found . n != self ) : #NEWLINE# #INDENT# self . match ( self , found ) #NEWLINE# #UNINDENT# return True