Kent Johnson wrote:
> Why not just use nested dicts?
> 
> MyProject = dict(
>    start = "2006-03-06",
>    resource = Me,
>    Task1 = dict(start = "2006-03-13"),
>    Task2 = dict(effort = "1w"),
> )

or nest class instances directly:

MyProject = Project(
    start = "2006-03-06",
    resource = Me,
    Task1 = Task(start = "2006-03-13"),
    Task2 = Task(effort = "1w"),
)

That seems pretty clear to me, it would be a snap to create dynamically 
and the implementation is simple.

Kent

_______________________________________________
Tutor maillist  -  Tutor@python.org
http://mail.python.org/mailman/listinfo/tutor

Reply via email to