Example #1
0
 def new_task(self, task_name, note=None, due_date=None):
     """Creates a new Task object with name, note and due date.
     If note and due date aren't specified, by default are None.
     Updates the dictionary of Task objects and returns
     the created task."""
     task = Task(task_name, note, due_date)
     self.tasks.update({task.id: task})
     return task