def add_done_callback(self, fn):
        """Attach the provided callable to the future.

        The provided function is called, with this future as its only argument,
        when the future finishes running.
        """
        if self.done():
            return fn(self)
        self._callbacks.append(fn)
def add_done_callback ( self , fn ) : if self . done ( ) : return fn ( self ) self . _callbacks . append ( fn )
Attach the provided callable to the future.

        The provided function is called, with this future as its only argument,
        when the future finishes running.