Why are some infinite recursion stack overflows hard to deal with?

Alex cut_me_out at hotmail.com
Wed Jul 12 10:31:58 EDT 2000


Probably everyone who could answer this is busy on the python-dev list,
but I'll ask now, anyway.  Why are some infinite recursion stack
overflows harder for python to deal with than others?  This is an
example from the bugs list:

class T:
    def __str__(self):
        print self
print T()

Is this just dumping stuff on the stack faster than a vanilla infinite
recursion, causing an overflow before the maximum recursion depth is
reached?  If so, what sort of stuff is it dumping?  And where would I
look in the source to understand this sort of thing?

Alex.



More information about the Python-list mailing list