IndentationError: two many levels of indentation

Steve Holden sholden at holdenweb.com
Fri Mar 7 08:55:10 EST 2003


"Two Inches" <missedby2inches at gmx.net> wrote in message
news:b49ia1$d5o$1 at mamenchi.zrz.TU-Berlin.DE...
> We've got this error when we tried to execute code that was created with
> a generator tool. The code had about 500 levels of indentation (nested
> if blocks). It is no problem for us to change the generator.
>
> However, I couldn't find this limitation in the language reference.
> Shouldn't it be in there? What is the exact limit?
>
> Is there any technical rational for this limit?
>
The limit will be set by a configuration parameter. It would seem more
sensible to me to alter your generation routines: is it *really* necessary
to generate code indented to 500 levels? Isn't there some way you could
paraphrase the generated Python so it doesn't require something that a real
programmer would never do in practice?

regards
--
Steve Holden                                  http://www.holdenweb.com/
Python Web Programming                 http://pydish.holdenweb.com/pwp/
Register for PyCon now!            http://www.python.org/pycon/reg.html








More information about the Python-list mailing list