Re: Method calls and stack consumption

2007-04-16 Thread Peter Otten
Martin Manns wrote: > Thanks for pointing out the oversimplified nature of the original > example.I hope that the following one clarifies the problem. > > (I do not know, what has to be stored on the stack, but it should not be > that much, because all recursion calls originate from inside the re

Re: Method calls and stack consumption

2007-04-15 Thread Martin Manns
On Sun, 15 Apr 2007 07:27:25 +0200 Peter Otten <[EMAIL PROTECTED]> wrote: > Martin Manns wrote: > > > Calling methods of other object instances seems quite expensive on > > the stack (see example below). Is there a better way of traversing > > through methods of instances that are connected in a

Re: Method calls and stack consumption

2007-04-14 Thread Peter Otten
Martin Manns wrote: > Calling methods of other object instances seems quite expensive on the > stack (see example below). Is there a better way of traversing through > methods of instances that are connected in a cyclic graph? (The real > program's graph contains multiple successors in lists.) >

Method calls and stack consumption

2007-04-14 Thread Martin Manns
Hi, Calling methods of other object instances seems quite expensive on the stack (see example below). Is there a better way of traversing through methods of instances that are connected in a cyclic graph? (The real program's graph contains multiple successors in lists.) class A(object): def _