Questions tagged [infinite-recursion]

An infinite recursion occurs when one or several recursive methods keep on calling each other and never reaching a terminal case. Such a situation will most likely end up in the call stack to overflow.

An infinite recursion occurs when one or several recursive methods keep on calling each other and never reaching a terminal case. Such a situation will most likely end up in the call stack to overflow.

64 questions
-1
votes
1 answer

How do I solve this Stack Over Flow Error?

I am struggling to solve this StackOverFlow exception when I try to run my TicTacToe program. From reading the stack trace I know that the StackOverFlow error is the result of a cyclic relationship. This is because when I instantiate the miniFrame…
-2
votes
1 answer

Property setter triggers infinite recursion, why?

Using the @property + setter encapsulation, I need a class that raises an exception when someone tries to change the account_number. However, in the __init__ function, I need to set the value. This is the code, it generates recursion. class…
Alejandro Veintimilla
  • 10,743
  • 23
  • 91
  • 180
-2
votes
3 answers

Infinite recursion with if statement in Python

I have this code: def get_girlfriend(): res = input("Will you go out with me? ") if (res == "y"): print("We've done it bois") return get_girlfriend() but I keep getting this error: RecursionError: maximum recursion depth…
-4
votes
1 answer

StackOverflow error for maze solving program

Currently I am trying to solve a program that determines whether it is possible to solve a maze and if the maze is solvable it should print out the number of steps to go through the maze path. The starting position and the end position and the maze…
1 2 3 4
5