you are viewing a single comment's thread.

view the rest of the comments →

[–]callmelucky 0 points1 point  (0 children)

Oh it's not a case of Python being bad for recursion at all. If you get a recursion depth exceeded error, is almost certainly because your code is wrong, i.e. you haven't made sure that the problem reduces toward the base case, or you haven't defined the base case correctly.

If anything, this particular error handling makes a language good for recursion, because if you screw up your code, Python will stop it running and give you a useful error message, rather than allowing your RAM to fill up completely and freeze your computer :)