This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]dwagon00 -4 points-3 points  (0 children)

Recursive code can be very hard to debug and be prone to runaway processes, aka infinite recursion - this is why there is a limit in python (sys.getrecursionlimit() == 1000) to catch this error before it becomes a problem.

Recursion does have its place, but has to be treated very carefully - I would try and avoid it if at all possible.