def f(): rstack.stack_frames_depth() rstack.set_stack_depth_limit(1) try: return g() except RuntimeError: return -123
def set_stack_depth_limit(space, limit): rstack.set_stack_depth_limit(limit)
def fn(): set_stack_depth_limit(sys.maxint) return f(10**6)
def f(): rstack.set_stack_depth_limit(12321) return rstack.get_stack_depth_limit()