#NEWLINE# def copy( self ) : #NEWLINE# #INDENT# 'Copies this retry detail.\n\n        Creates a shallow copy of this retry detail (any meta-data and\n        version information that this object maintains is shallow\n        copied via ``copy.copy``).\n\n        NOTE(harlowja): This copy does **not** copy\n        the incoming objects ``results`` or ``revert_results`` attributes.\n        Instead this objects ``results`` attribute list is iterated over and\n        a new list is constructed with each ``(data, failures)`` element in\n        that list having its ``failures`` (a dictionary of each named\n        :py:class:`~taskflow.types.failure.Failure` object that\n        occured) copied but its ``data`` is left untouched. After\n        this is done that new list becomes (via assignment) the cloned\n        objects ``results`` attribute. The ``revert_results`` is directly\n        assigned to the cloned objects ``revert_results`` attribute.\n\n        See: https://bugs.launchpad.net/taskflow/+bug/1452978 for\n        what happens if the ``data`` in ``results`` is copied at a\n        deeper level (for example by using ``copy.deepcopy`` or by\n        using ``copy.copy``).\n\n        :returns: a new retry detail\n        :rtype: :py:class:`.RetryDetail`\n        ' #NEWLINE# clone = copy . copy ( self ) #NEWLINE# results = [ ] #NEWLINE# for ( data , failures ) in self . results : #NEWLINE# #INDENT# copied_failures = { #NEWLINE# #INDENT# #NEWLINE# #UNINDENT# } #NEWLINE# for ( key , failure ) in six . iteritems ( failures ) : #NEWLINE# #INDENT# copied_failures [ key ] = failure #NEWLINE# #UNINDENT# results . append ( ( data , copied_failures ) ) #NEWLINE# #UNINDENT# clone . results = results #NEWLINE# clone . revert_results = self . revert_results #NEWLINE# if self . meta : #NEWLINE# #INDENT# clone . meta = self . meta . copy ( ) #NEWLINE# #UNINDENT# if self . version : #NEWLINE# #INDENT# clone . version = copy . copy ( self . version ) #NEWLINE# #UNINDENT# return clone