def removeItems(self, tasks): super(TaskList, self).removeItems(tasks) for task in self._compositesAndAllChildren(tasks): for category in task.categories(): category.removeCategorizable(task)
def extend(self, tasks): super(TaskList, self).extend(tasks) for task in self._compositesAndAllChildren(tasks): for category in task.categories(): category.addCategorizable(task)