title: What is the maximum recursion depth in Python, and how to increase it?
body: <p>I have this tail recursive function here:</p>
  
  <pre><code>def recursive_function(n, sum):
      if n &lt; 1:
          return sum
      else:
          return recursive_function(n-1, sum+n)
  
  c = 998
  print(recursive_function(c, 0))
  </code></pre>
  
  <p>It works up to <code>n=997</code>, then it just breaks and spits out a <code>RecursionError: maximum recursion depth exceeded in comparison</code>. Is this just a stack overflow? Is there a way to get around it?</p>