I was trying to make recursive function when i came across this problem (not really a problem but i am curious and couldnt find the answer anywhere else). When i run the code, it gives me a recursion error and how many times it repeated before the recursion limit was' exceeded.
[Previous line repeated 91 more times]
RecursionError: maximum recursion depth exceeded
In this case i had set the recursion limit to 100 but the number of times it repeated was 91, similarly if i set the limit to 1000, the error is [Previous line repeated 991 more times]
. I assumed this was happening because the first few parts of the stack were being taken up by other parts of the program, so i tried adding the same function to a different peice of code but the recursion is still 9 less. Whys this happening?