News for hackers. Stuff that matters.
Re:New Ways to Be Told That Your Python Code Is Bad by jbverschoor on Friday September 03, 2021 @05:26AM (#28402062)
I usually do some sort of maximum recursion check. For things where I’d expect for example max 10 levels, I’d check for 1000-10000, and then raise an exception.
Re:New Ways to Be Told That Your Python Code Is Bad by hnfong on Friday September 03, 2021 @03:59PM (#28408688)
In Python? Apparently the default for RecursionError is already 1000.

For other languages, you might still hit stack overflow (not the site) before you get to 10000 if the stuff you push on the stack is large-ish.