#NEWLINE# def put( self , state , result ) : #NEWLINE# #INDENT# 'Puts a result (acquired in the given state) into this detail.\n\n        Returns whether this object was modified (or whether it was not).\n        ' #NEWLINE# was_altered = False #NEWLINE# if ( state != self . state ) : #NEWLINE# #INDENT# self . state = state #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# if ( state == states . REVERT_FAILURE ) : #NEWLINE# #INDENT# if ( self . revert_failure != result ) : #NEWLINE# #INDENT# self . revert_failure = result #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# if ( not _is_all_none ( self . results , self . revert_results ) ) : #NEWLINE# #INDENT# self . results = None #NEWLINE# self . revert_results = None #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( state == states . FAILURE ) : #NEWLINE# #INDENT# if ( self . failure != result ) : #NEWLINE# #INDENT# self . failure = result #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# if ( not _is_all_none ( self . results , self . revert_results , self . revert_failure ) ) : #NEWLINE# #INDENT# self . results = None #NEWLINE# self . revert_results = None #NEWLINE# self . revert_failure = None #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( state == states . SUCCESS ) : #NEWLINE# #INDENT# if ( not _is_all_none ( self . revert_results , self . revert_failure , self . failure ) ) : #NEWLINE# #INDENT# self . revert_results = None #NEWLINE# self . revert_failure = None #NEWLINE# self . failure = None #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# if ( result is not self . results ) : #NEWLINE# #INDENT# self . results = result #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( state == states . REVERTED ) : #NEWLINE# #INDENT# if ( not _is_all_none ( self . revert_failure ) ) : #NEWLINE# #INDENT# self . revert_failure = None #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# if ( result is not self . revert_results ) : #NEWLINE# #INDENT# self . revert_results = result #NEWLINE# was_altered = True #NEWLINE# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# #UNINDENT# return was_altered