Dec-14-2018, 06:54 PM
In an application I am working on, users can traverse a graph. However, when they move on the graph, they are basically adding five function calls to the stack. Since the graph is connected, they could theoretically put enough function calls on the stack to run into the recursion limit. This is not something I expect to be likely. Traversing the graph is not the main function of the application, and it would be rather extreme to do it the 200 times it would take to hit the recursion limit (on my machine at least). But I have a feeling that someday, someone is going to try it, if only because they can.
Now, I know how to determine and change the recursion limit. It looks like the traceback module has way to explore the stack. But I couldn't find anything that just told me how big the stack was, or how close it was to the recursion limit. Does anyone know a simple way to get just that information? Or would I need to pull a summary of the whole stack using traceback and measure it myself?
Now, I know how to determine and change the recursion limit. It looks like the traceback module has way to explore the stack. But I couldn't find anything that just told me how big the stack was, or how close it was to the recursion limit. Does anyone know a simple way to get just that information? Or would I need to pull a summary of the whole stack using traceback and measure it myself?
Craig "Ichabod" O'Brien - xenomind.com
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures
I wish you happiness.
Recommended Tutorials: BBCode, functions, classes, text adventures