#NEWLINE# def iter( self , start = 0 , end = None ) : #NEWLINE# #INDENT# 'Iterate through successive history items.\n\n        Parameters\n        ----------\n        end : int\n            Index of the last item to loop through + 1.\n\n        start : int\n            Initial index for the loop (0 by default).\n\n        ' #NEWLINE# if ( end is None ) : #NEWLINE# #INDENT# end = ( self . _index + 1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( end == 0 ) : #NEWLINE# #INDENT# raise StopIteration ( ) #NEWLINE# #UNINDENT# #UNINDENT# if ( start >= end ) : #NEWLINE# #INDENT# raise StopIteration ( ) #NEWLINE# #UNINDENT# assert ( 0 <= end <= len ( self . _history ) ) #NEWLINE# assert ( 0 <= start <= ( end - 1 ) ) #NEWLINE# for i in range ( start , end ) : #NEWLINE# #INDENT# ( yield self . _history [ i ] )