mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
make too many nested blocks be a SyntaxError instead of a SystemError (closes #27514)
Patch by Ammar Askar.
This commit is contained in:
parent
2b8792137b
commit
e09ed5419b
3 changed files with 8 additions and 3 deletions
|
@ -3980,7 +3980,7 @@ compiler_push_fblock(struct compiler *c, enum fblocktype t, basicblock *b)
|
|||
{
|
||||
struct fblockinfo *f;
|
||||
if (c->u->u_nfblocks >= CO_MAXBLOCKS) {
|
||||
PyErr_SetString(PyExc_SystemError,
|
||||
PyErr_SetString(PyExc_SyntaxError,
|
||||
"too many statically nested blocks");
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue