Alexander wrote: > * A list of tasks, where each task has a number of attributes. > Each task should be able to have subtasks.
Sounds like you should keep the Task objects in a list :-) Possibly just the top-level tasks should be in the list... > * A way to filter/search on the attributes of the tasks. > > What I've tried so far is something like this: > > <snip> > class Task(object): > def __init__(self, cargo, children=[]): Don't use mutable objects as default arguments! See http://effbot.org/pyfaq/why-are-default-values-shared-between-objects.htm for an explanation. Kent _______________________________________________ Tutor maillist - Tutor@python.org http://mail.python.org/mailman/listinfo/tutor