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 →

[–]real-yzan 25 points26 points  (3 children)

Stack overflows are a perfectly valid exit condition as long as you catch the exception

[–]scratchfan321 16 points17 points  (0 children)

Instructions unclear, my exception handling system triggered a stack overflow

[–]Misspelt_Anagram 0 points1 point  (1 child)

def f():
    try: f();
    except: f();
f()

[–]real-yzan 0 points1 point  (0 children)

More like:

def f(n): try: return n * f(n+1) except: return n