Why does Python have a limit on the number of static blocks that can be nested?

Viewed 9334

The number of statically nested blocks in Python is limited to 20. That is, nesting 19 for loops will be fine (although excessively time consuming; O(n^19) is insane), but nesting 20 will fail with:

SyntaxError: too many statically nested blocks

What is the underlying reason for having such a limit? Is there a way to increase the limit?

3 Answers
Related