2 ms·
Python will also do something like that, specifically it snips out repeated lines in self-recursive calls: https://github.com/python/cpython/issues/71010 https:
by masklinn 3y ago
Python will also do something like that, specifically it snips out repeated lines in self-recursive calls: https://github.com/python/cpython/issues/71010 https://github.com/python/cpython/issues/71010
>>> a()
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 3, in a
File "<stdin>", line 3, in a
File "<stdin>", line 3, in a
[Previous line repeated 894 more times]
File "<stdin>", line 2, in a
File "<stdin>", line 2, in b
File "<stdin>", line 2, in c
File "<stdin>", line 2, in c
File "<stdin>", line 2, in c
[Previous line repeated 97 more times]
RecursionError: maximum recursion depth exceeded
Sadly it's not smart enough to handle indirect recursion, so in those cases you get a thousand lines of garbage.