New submission from TW <t...@waldmann-edv.de>:
user@development:~$ python3 Python 3.7.3 (default, Jan 22 2021, 20:04:44) [GCC 8.3.0] on linux Type "help", "copyright", "credits" or "license" for more information. def recurse(n): print(n) try: recurse(n+1) except RecursionError: print("recursion error") print(n) Please note that there are 2 print(n) on the same level. >>> recurse(0) 0 1 2 ... 994 995 recursion error 994 993 ... 2 1 0 Why is there no 2nd 995 after the recursion error? Same happens for python 3.8.8 and 3.9.2. Related question: I also tried to set sys.setrecursionlimit(100000) and ran recurse(0), but at a bit beyond 21800, it just segfaulted. Is there a way to determine the practically working maximum it can do? ---------- components: Interpreter Core messages: 389848 nosy: ThomasWaldmann2 priority: normal severity: normal status: open title: strange effect at recursion limit type: behavior versions: Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43674> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com