title: exiting a Python function call
body: <p>How can my program exit a function call? I have a recursive function that, when a condition is satisfied, calls itself. </p>
  
  <pre><code>def function( arg ):
      if (condition):
          ...
          return function( arg + 1 )
  </code></pre>
  
  <p>My guess at how it works: if the condition is not satisfied, the function call will terminate. In my program, that doesn't seem to be the case -- the condition is violated but the program jumps to the return statement (perhaps the only return statement it sees?).</p>
  
  <p>Is there some sort of exit() that I could put in an else clause?</p>