Terry Reedy wrote: > "Bryan Olson" wrote: > >>I made a script with 100,000 if's, (code below) and it appears >>to work on a couple systems, including Python 2.4.2 on Win32-XP. >>So at first cut, it doesn't seem to be just the if-count that >>triggers the bug. > > The OP did not specify whether all of his if-tests were sequential as in > your test or if some were nested. I vaguely remember there being an indent > limit (40??).
A 40-level indent limit is reasonable (I may get around to looking it up and/or testing it), but if we believe 'slogging' and Alan, what we have here is an outright Python bug. They did not report a message about static code being too deeply nested, nor about dynamic calls exceeding a recursion limit. They reported incorrect behavior. My favorite joke goes: Patient: Doctor...doctor -- it hurts when I do that! (With 'that' being some movement that is unusual but normally innocuous.) Doctor: Don't do that. Ah...cracks me up. Funny on so many levels. -- --Bryan -- http://mail.python.org/mailman/listinfo/python-list