Post Reply 
Bug implementing infinite Recursion?
01-04-2018, 07:05 PM (This post was last modified: 01-04-2018 07:49 PM by StephenG1CMZ.)
Post: #7
RE: Bug implementing infinite Recursion?
(01-04-2018 05:06 PM)Tim Wessman Wrote:  Not a question of "how to implement" but rather pointing out that just "block the recursion" is not something that is either desirable in many cases or possible within reason as there are many cases when you can have what appears to be an infinite recursion when in actuality it is not.

Of course whether or not it is infinite, or even whether or not it is recursion, is difficult to detect and largely unimportant. The simpler question is: Is there room to add another call to the stack? And if not, should I make it look like the program worked (almost)?

So, if you are struggling to discover some obscure bug such as how your code assigned a list to an integer... Consider the possibility that an infinitely deeply nested procedure call earlier in the execution might have completed and done that for you. Smile In my case, I wasn't tracking down a non-integer count, just wondering why the program was a little slow (but only seconds, not minutes...With some calculations, you might not notice).

Stephen Lewkowicz (G1CMZ)
https://my.numworks.com/python/steveg1cmz
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: Bug implementing infinite Recursion? - StephenG1CMZ - 01-04-2018 07:05 PM



User(s) browsing this thread: 1 Guest(s)