Dennis Sweeney <sweeney.dennis...@gmail.com> added the comment:
Indeed, this behavior is documented at https://docs.python.org/3/library/sys.html?highlight=setrecursionlimit#sys.setrecursionlimit : "a too-high limit can lead to a crash". I'd recommend refactoring to use iteration rather than recursion: def fact(n): product = 1 for i in range(1, n+1): product *= i return product ---------- nosy: +Dennis Sweeney resolution: -> not a bug stage: -> resolved status: open -> closed _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44790> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com