[Tutor] strange recursion result
Sheila King
sheila@thinkspot.net
Mon, 08 Jan 2001 13:25:04 -0800
On Mon, 08 Jan 2001 16:20:39 -0600, Tesla Coil <tescoil@irtc.net> wrote about
Re: [Tutor] strange recursion result:
:On 8 Jan 2001, Kalle Svensson wrote:
:> Which version of Python are you using? If you are using 2.0
:> (the latest), try sys.setrecursionlimit(). It is documented on
:> http://www.python.org/doc/current/lib/module-sys.html
:
:"The highest possible limit is platform-dependent. A user
:may need to set the limit higher when she has a program
:that requires deep recursion and a platform that supports
:a higher limit. This should be done with care, because a
:too-high limit can lead to a crash."
:
:Okay, how to determine the limit for your platform
:without a stress test? (fun tho' that may be...)
>From the same page,
http://www.python.org/doc/current/lib/module-sys.html
getrecursionlimit()
I tried it out on my IDLE in interactive mode. I don't know what I was doing
wrong, but it didn't work for me.
Here is my session:
Python 1.5.2 (#0, Apr 13 1999, 10:51:12) [MSC 32 bit (Intel)] on win32
Copyright 1991-1995 Stichting Mathematisch Centrum, Amsterdam
>>> import sys
>>> print sys.getrecursionlimit()
Traceback (innermost last):
File "<pyshell#1>", line 1, in ?
print sys.getrecursionlimit()
AttributeError: getrecursionlimit
>>>
What am I doing wrong? (Be nice: newbie, here.)
--
Sheila King
http://www.thinkspot.net/sheila/
http://www.k12groups.org/