Irit Katriel <iritkatr...@yahoo.com> added the comment:
The error is coming from here: https://github.com/python/cpython/blob/cb9879b948a19c9434316f8ab6aba9c4601a8173/Objects/frameobject.c#L958 and CO_MAXBLOCKS is defined in Include/cpython/code.h #define CO_MAXBLOCKS 20 /* Max static block nesting within a function */ This is not about recursion or about exception, it's about static nesting level. There is an example here showing an input that gives the same error with >20 nested while blocks: https://github.com/python/cpython/blob/c8f29ad986f8274fc5fbf889bdd2a211878856b9/Lib/test/test_syntax.py#L545 ---------- nosy: +iritkatriel _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue39934> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com