how many nested for can we utilize?
Lie.1296 at gmail.com
Mon Aug 18 17:04:18 CEST 2008
On Aug 17, 4:23 pm, Fredrik Lundh <fred... at pythonware.com> wrote:
> Patrol Sun wrote:
> > when I use 20 for ,"SystemError: too many statically nested blocks"
> > When I use 100 for ,"IndentationError: too many levels of indentation"
> > How to handle these errors?
> so why exactly are you trying to nest 20 or 100 for-in loops?
I think most (all?) algorithm that might use 20+ levels of for-in
loops could almost always be replaced with a recursive function. Or at
least they could be broken into smaller functions.
More information about the Python-list