[Tutor] data structure question

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


"Tiger12506" <keridee at jayco.net> wrote in message 
news:000601c85a1e$0dbedcb0$81fde004 at jslaptop...
>>    def recursive_print(self, level=0):
>>        print "\t"*level + self.cargo
>>        for x in self.children:
>>          recursive_print(x,level+1)
>
> Whoops. should be
>
> for x in self.children:
>    x.recursive_print(level+1)

Ah, you already caught it, my gmane feed ruinning a bit slow...

Alan G 




More information about the Tutor mailing list