<p dir="ltr"><br>
On Dec 22, 2014 2:37 PM, "Dave Angel" <<a href="mailto:davea@davea.name">davea@davea.name</a>> wrote:<br>
><br>
> I'll pick on one function first, called instructions().  If the user types something invalid, you print "Invalid input." and call the function again.  In this case, because the call is at the end, no harm is usually done, but it would be tricky to explain why.  If the user happened to type the wrong input 1000 times, you'd hit a recursion limit and crash, but that's unlikely unless you have a very stubborn user.</p>
<p dir="ltr">Point of interest, Python (or at least CPython) doesn't optimize tail-call recursion, so in fact this sort of unbounded recursion (a "stack leak", if you will) is equally bad no matter where it appears in the function.</p>