#NEWLINE# def __contains__( self , val ) : #NEWLINE# #INDENT# pos = 0 #NEWLINE# if ( self . _result_cache is not None ) : #NEWLINE# #INDENT# if ( val in self . _result_cache ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( self . _iter is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# #UNINDENT# pos = len ( self . _result_cache ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# it = iter ( self ) #NEWLINE# #UNINDENT# while True : #NEWLINE# #INDENT# if ( len ( self . _result_cache ) <= pos ) : #NEWLINE# #INDENT# self . _fill_cache ( num = 1 ) #NEWLINE# #UNINDENT# if ( self . _iter is None ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# if ( self . _result_cache [ pos ] == val ) : #NEWLINE# #INDENT# return True #NEWLINE# #UNINDENT# pos += 1