#NEWLINE# def diff( self , summary1 = None , summary2 = None ) : #NEWLINE# #INDENT# 'Compute diff between to summaries.\n\n        If no summary is provided, the diff from the last to the current\n        summary is used. If summary1 is provided the diff from summary1\n        to the current summary is used. If summary1 and summary2 are\n        provided, the diff between these two is used.\n\n        ' #NEWLINE# res = None #NEWLINE# if ( summary2 is None ) : #NEWLINE# #INDENT# self . s1 = self . create_summary ( ) #NEWLINE# if ( summary1 is None ) : #NEWLINE# #INDENT# res = summary . get_diff ( self . s0 , self . s1 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# res = summary . get_diff ( summary1 , self . s1 ) #NEWLINE# #UNINDENT# self . s0 = self . s1 #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( summary1 is not None ) : #NEWLINE# #INDENT# res = summary . get_diff ( summary1 , summary2 ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise ValueError ( 'You cannot provide summary2 without summary1.' ) #NEWLINE# #UNINDENT# #UNINDENT# return summary . _sweep ( res )