3 ms·
I think a debug command line switch to python would suffice. You could use the heap to store stack traces when TCO is in use.
by eggnet 17y ago
I think a debug command line switch to python would suffice. You could use the heap to store stack traces when TCO is in use.
- deleted 17y ago[deleted]
- ralph 17y agoUsing the heap to store stack traces when TCO is in use and a "debugging" flag is set won't work. It could cause memory to be exhausted. You're effectively causing each recursion to consume memory; something TCO is trying to avoid. If the coder assumes TCO then they could have written code which will exhaust memory once the "debugging flag" starts storing stack trace information.