def attach(self, controller): # here `Task.attach` is the invocation of the superclass' # `attach` method (which attaches *this* object to a controller), # while `self.task.attach` is the propagation of the `attach` # method to the wrapped task. (Same for `detach` below.) Task.attach(self, controller) self.task.attach(controller)
def attach(self, controller): # here `Task.attach` is the invocation of the superclass' # `attach` method (which attaches *this* object to a controller), # while `self.task.attach` is the propagation of the `attach` # method to the wrapped task. (Same for `detach` below.) Task.attach(self, controller) self.task.attach(controller)
def attach(self, controller): """ Use the given Controller interface for operations on the job associated with this task. """ if self._current_task is not None: self.tasks[self._current_task].attach(controller) Task.attach(self, controller)
def attach(self, controller): """ Use the given Controller interface for operations on the job associated with this task. """ if self._current_task is not None: self.tasks[self._current_task].attach(controller) Task.attach(self, controller)
def attach(self, controller): """ Use the given Controller interface for operations on the job associated with this task. """ for task in self.tasks: if not task._attached: task.attach(controller) Task.attach(self, controller)
def attach(self, controller): """ Use the given Controller interface for operations on the job associated with this task. """ for task in self.tasks: if not task._attached: task.attach(controller) Task.attach(self, controller)