how many nested for can we utilize?

Paul Boddie paul at boddie.org.uk
Sun Aug 17 14:27:58 EDT 2008


On 17 Aug, 19:36, Fredrik Lundh <fred... at pythonware.com> wrote:
>
> and functions will solve the 40-billion year computation problem exactly
> how?

I was thinking more about the need to nest "for" statements to a depth
of 20 levels, which I imagine only arises on a "just in case" basis
for the inquirer. In other words, the inquirer may have input that
could theoretically demand twenty levels of state, each level provided
by a single "for" statement, but in practice they might only need to
manage a few levels of state.

In any case, we're potentially seeing the use of the wrong tool for
the job, and I am speculating that functions would be the right tool,
but unless the inquirer is willing to show the code (which I haven't
seen in this thread yet), it's hard to speculate further.

Paul



More information about the Python-list mailing list