[Tutor] data structure question

Alan Gauld alan.gauld at btinternet.com
Sat Jan 19 02:06:17 CET 2008


"Tiger12506" <keridee at jayco.net> wrote

> class Task(object):
>   ...
>    def recursive_print(self, level=0):
>        print "\t"*level + self.cargo
>        for x in self.children:
>          recursive_print(x,level+1)

             x.recursive_print(level+1)

Is what you meant I think :-)

Alan G.



More information about the Tutor mailing list