This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Dennis Sweeney
Recipients Dennis Sweeney, jack__d, michaeljwang10
Date 2021-07-31.03:45:52
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1627703153.0.0.924432422074.issue44790@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2021-07-31 03:45:53Dennis Sweeneysetrecipients: + Dennis Sweeney, jack__d, michaeljwang10
2021-07-31 03:45:52Dennis Sweeneysetmessageid: <1627703153.0.0.924432422074.issue44790@roundup.psfhosted.org>
2021-07-31 03:45:52Dennis Sweeneylinkissue44790 messages
2021-07-31 03:45:52Dennis Sweeneycreate