[Tutor] Infinite recursion or too big a problem?

D-Man dsh8290@rit.edu
Wed, 4 Jul 2001 12:22:04 -0400


On Wed, Jul 04, 2001 at 03:14:21AM -0600, VanL wrote:

| I think I wrote this correctly, but do I have infinite recursion that I 
| haven't caught somewhere?

I haven't checked the code yet, but with 6-8 thousand logs to traverse
you could very well be hitting the stack limit even if your code is
correct.  Try it again with only a couple log files (samples you stick
somewhere to play with) and see if it works then.  If it does, you
know the code is correct and you need Stackless to get a big enough
stack.  (Stackless puts the python stack on the C heap so you are only
limited by the heap space on your system.  CPython intertwines the
python stack with the C stack so when you run out of C stack (C has a
relatively small stack, compared to functional languages) you run out
of Python stack and get the error you were seeing).

HTH,
-D