#NEWLINE# @ abc . abstractmethod #NEWLINE# def merge( self , other , deep_copy = False ) : #NEWLINE# #INDENT# 'Merges the current object state with the given ones state.\n\n        If ``deep_copy`` is provided as truthy then the\n        local object will use ``copy.deepcopy`` to replace this objects\n        local attributes with the provided objects attributes (**only** if\n        there is a difference between this objects attributes and the\n        provided attributes). If ``deep_copy`` is falsey (the default) then a\n        reference copy will occur instead when a difference is detected.\n\n        NOTE(harlowja): If the provided object is this object itself\n        then **no** merging is done. Do note that **no** results are merged\n        in this method. That operation **must** to be the responsibilty of\n        subclasses to implement and override this abstract method\n        and provide that merging themselves as they see fit.\n\n        :returns: this atom detail (freshly merged with the incoming object)\n        :rtype: :py:class:`.AtomDetail`\n        ' #NEWLINE# copy_fn = _copy_function ( deep_copy ) #NEWLINE# self . state = other . state #NEWLINE# self . intention = other . intention #NEWLINE# if ( self . failure != other . failure ) : #NEWLINE# #INDENT# if other . failure : #NEWLINE# #INDENT# if deep_copy : #NEWLINE# #INDENT# self . failure = other . failure . copy ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . failure = other . failure #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . failure = None #NEWLINE# #UNINDENT# #UNINDENT# if ( self . revert_failure != other . revert_failure ) : #NEWLINE# #INDENT# if other . revert_failure : #NEWLINE# #INDENT# if deep_copy : #NEWLINE# #INDENT# self . revert_failure = other . revert_failure . copy ( ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . revert_failure = other . revert_failure #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# self . revert_failure = None #NEWLINE# #UNINDENT# #UNINDENT# if ( self . meta != deep_copy . meta ) : #NEWLINE# #INDENT# self . meta = copy_fn ( other . meta ) #NEWLINE# #UNINDENT# if ( self . version != other . version ) : #NEWLINE# #INDENT# self . version = copy_fn ( other . version ) #NEWLINE# #UNINDENT# return self