Instead of threading a counter ( or an accumulator as for
tail-recursive functions ) you can monitor the behaviour of the mutual
recusive function call using an external stack and wrap the
contributing functions using a decorator s.t. pushing and popping to
and from the stack are pre- and postproce
robert wrote:
> My code does recursion loops through a couple of functions. Due to
> problematic I/O input this leads sometimes to "endless" recursions and after
> expensive I/O to the Python recursion exception.
> What would be a good method to detect recursion loops and stop it by
> user-Exce
Neil Cerutti wrote:
> On 2006-12-01, robert <[EMAIL PROTECTED]> wrote:
>> Ben Finney wrote:
>>> robert <[EMAIL PROTECTED]> writes:
>>>
Carl Banks wrote:
> 2. Consider whether you're unwittingly trying to cover up a bug.
> ISTM no matter how problematic the input is, you should at least
robert wrote:
> Ben Finney wrote:
> > robert <[EMAIL PROTECTED]> writes:
> >
> >> Carl Banks wrote:
> >>> 2. Consider whether you're unwittingly trying to cover up a bug.
> >>> ISTM no matter how problematic the input is, you should at least
> >>> be able to make progress on it. Are you getting th
On 2006-12-01, robert <[EMAIL PROTECTED]> wrote:
> Ben Finney wrote:
>> robert <[EMAIL PROTECTED]> writes:
>>
>>> Carl Banks wrote:
2. Consider whether you're unwittingly trying to cover up a bug.
ISTM no matter how problematic the input is, you should at least
be able to make progr
Ben Finney wrote:
> robert <[EMAIL PROTECTED]> writes:
>
>> Carl Banks wrote:
>>> 2. Consider whether you're unwittingly trying to cover up a bug.
>>> ISTM no matter how problematic the input is, you should at least
>>> be able to make progress on it. Are you getting this error
>>> because, say,
robert <[EMAIL PROTECTED]> writes:
> Carl Banks wrote:
> > 2. Consider whether you're unwittingly trying to cover up a bug.
> > ISTM no matter how problematic the input is, you should at least
> > be able to make progress on it. Are you getting this error
> > because, say, you're not incrementing
robert wrote:
>
> the "bug" comes in from the I/O input.
>
Have you considered checking your input for valid values?
Cheers,
John
--
http://mail.python.org/mailman/listinfo/python-list
Carl Banks wrote:
> robert wrote:
>> My code does recursion loops through a couple of functions. Due to
>> problematic I/O input this leads sometimes to "endless" recursions and after
>> expensive I/O to the Python recursion exception.
>> What would be a good method to detect recursion loops and
Rob Wolfe wrote:
> robert wrote:
>> My code does recursion loops through a couple of functions. Due to
>> problematic I/O input this leads sometimes to "endless" recursions and after
>> expensive I/O to the Python recursion exception.
>> What would be a good method to detect recursion loops and s
Hi!
I hope you are not trying to find infinite loops and I simply
misunderstood your question. Because if you are, then forget it (Turing
anyone?)... Infinite loops are impossible to find (minus some few, very
specific situations).
Cf. http://en.wikipedia.org/wiki/Halting_problem
Cheers,
Hugo F
robert wrote:
> My code does recursion loops through a couple of functions. Due to
> problematic I/O input this leads sometimes to "endless" recursions and after
> expensive I/O to the Python recursion exception.
> What would be a good method to detect recursion loops and stop it by
> user-Excep
robert wrote:
> My code does recursion loops through a couple of functions. Due to
> problematic I/O input this leads sometimes to "endless" recursions and after
> expensive I/O to the Python recursion exception.
> What would be a good method to detect recursion loops and stop it by
> user-Exce
13 matches
Mail list logo