allow removal of multiple tasks at once

This commit is contained in:
Anders Ingemann 2013-06-30 23:54:28 +02:00
parent 3cf6a20ba4
commit b8341c48e4

View file

@ -12,8 +12,9 @@ class TaskList(object):
def add(self, *args):
self.tasks.update(args)
def remove(self, task):
self.tasks.discard(self.get(task))
def remove(self, *args):
for task in args:
self.tasks.discard(self.get(task))
def replace(self, task, replacement):
self.remove(task)