Logo Search packages:      
Sourcecode: yagtd version File versions  Download package

def gtd::ToDo::add (   self,
  task 
)
Add a new task to the to-do list (automatically set the 'id').

Definition at line 367 of file gtd.py.

                       :
        """Add a new task to the to-do list (automatically set the 'id')."""
        
        if not isinstance(task, Task):
            raise TypeError, "'%s' is not an instance of Task" % task
        task['id'] = self._last_id() + 1  # first, set task Id
        List.append(self, task)
        return task['id']  # added task Id


Generated by  Doxygen 1.6.0   Back to index