Open
Description
Bug report
A minimal example:
# fib.py
import sys
sys.setrecursionlimit(2000)
from functools import cache
@cache
def fib(n):
if n<1: return 0
if n==1: return 1
return fib(n-1) + fib(n-2)
print(fib(500))
CPython versions tested on:
CPython main branch
Operating systems tested on:
Windows
Edit: This (simpler) example is from @dimpase .