Factorial Limits


I found that the factorial function has an odd limit.
Its a very unspecific number and i was wondering if anyone knew why this is the recursive limit.
Also if there is a way to bypass it i would be glad to know.

Also code is working fine I just put it here as a formality.

def factorial(x):
    if x == 1:
        return 1
        print x
        return x * factorial(x - 1)

print "The factorial is: " + str(factorial(991))



after some google research, I found that python has a maximum recursion depth. See for example

" The Python interpreter limits the depths of recursion to help you avoid infinite recursions, resulting in stack overflows "

" sys.getrecursionlimit()
Return the current value of the recursion limit, the maximum depth of the Python interpreter stack. This limit prevents infinite recursion from causing an overflow of the C stack and crashing Python. It can be set by setrecursionlimit(). "

I hope that it answers your question