I was working on a pygame project on VS code and accidentally written the following code:
def appear():
end()
def end():
appear()
and my pylance shown no error. I was wondering why in line 2 it was not showing "end is not defined".
And when I ran this small piece of code in a seperate python file:
def appear():
end()
def end():
appear()
appear()
the interpreter too did not show NameError but instead after four to five seconds it shows a RecursionError, something like this:
...
File "c:/Users/.../test.py", line 5, in end
appear()
File "c:/Users/.../test.py", line 2, in appear
end()
File "c:/Users/.../test.py", line 5, in end
appear()
File "c:/Users/.../test.py", line 2, in appear
end()
File "c:/Users/.../test.py", line 5, in end
appear()
File "c:/Users/.../test.py", line 2, in appear
end()
File "c:/Users/.../test.py", line 5, in end
appear()
File "c:/Users/.../test.py", line 2, in appear
end()
RecursionError: maximum recursion depth exceeded
What does it mean??