Too Many if Statements?

ajones ajones1 at gmail.com
Thu Feb 9 11:57:26 EST 2006


slogging_away wrote:
> Terry Reedy wrote:
>
> > 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??).
>
> Most of the if statements are nested.  Almost all of them fall under a
> central 'for xxx in range(x,x,x)', (this is the statement that checks
> thorugh each of the saved configuration files).   Under that 'for'
> statment are the bulk of the 'if' statements - some nested and some not
> - some also fall under other 'for' statements.  The indent level does
> not exceed 10..
>

Has anyone considered that this may be part of the issue? If he is
stepping through a range this is not just X if statements but n * x
where n is the number of loops. Possibly some variables that are not
getting freed between loops? (my guess would be that it is related to
logging) Anyways, no expert here, just wanted to point that out.




More information about the Python-list mailing list