#NEWLINE# def next( self ) : #NEWLINE# #INDENT# if ( not self . collection ) : #NEWLINE# #INDENT# raise StopIteration #NEWLINE# #UNINDENT# ( item , i ) = heappop ( self . collection ) #NEWLINE# self . enheap ( i ) #NEWLINE# return item