@technoway Python actually has a built-in limit on how deep the Python call stack can go. You can get the current limit with sys.getrecursionlimit() and change it with sys.setrecursionlimit(limit). The default limit is 1000, which is normally enough that you don't overflow the native stack even if you hit the Python recursion limit. In Pythonista that seems to be too much though, if I run an infinitely recursing function with the default limit, Pythonista crashes. With a lower limit (such as 500) I get a Python RecursionError as expected. I have no idea what the size of the native stack is on iOS, but it's probably lower than on Mac.