Strange, but interesting recursion problem in PythonWin.
Jeff Epler
jepler at unpythonic.net
Thu Apr 11 15:17:23 EDT 2002
On Thu, Apr 11, 2002 at 04:51:43PM +0200, F.Baart at sfk.nl wrote:
> I noticed something strange in the PythonWin
>
> I have the following code:
> def countdown(n):
> if n==0: print 'ready'
> else: countdown(n-1)
>
> I have a maximumrecursionlimit of 1000.
> When I run the countdown function with n=985 it works.
> When I run the countdown function with n=987 it raises a maxrecursionlimit
> error (which you would only expect at n>=999)
> But when I run the countdown function with n=986 pythonwin crashes.
>
> Remarkable is that when I run the countdown function in a dos shell it runs
> up to n=999 and never crashes.
In Pythonwin, there are probably some execution frames "above" the one
where the interactive interpreter executes.
I don't know why it crashes, though.
Jeff
More information about the Python-list
mailing list