This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author iritkatriel
Recipients iritkatriel, myzhang1029
Date 2020-09-23.23:11:01
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1600902661.73.0.388034208867.issue39934@roundup.psfhosted.org>
In-reply-to
Content
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
History
Date User Action Args
2020-09-23 23:11:01iritkatrielsetrecipients: + iritkatriel, myzhang1029
2020-09-23 23:11:01iritkatrielsetmessageid: <1600902661.73.0.388034208867.issue39934@roundup.psfhosted.org>
2020-09-23 23:11:01iritkatriellinkissue39934 messages
2020-09-23 23:11:01iritkatrielcreate