[Tutor] strange recursion result
Mon, 8 Jan 2001 11:34:43 -0500
On Mon, Jan 08, 2001 at 01:25:04PM -0800, Sheila King wrote:
| On Mon, 08 Jan 2001 16:20:39 -0600, Tesla Coil <email@example.com> wrote about
| Re: [Tutor] strange recursion result:
| >From the same page,
| 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.)
Using python 1.5.2 ;-).
The documentation you are using on python.org is for the latest
relase, 2.0. 2.0 changed some things and added a number of features.
getrecursionlimit() is one of them.
I recently installed Debian 2.2 which comes with python 1.5.2 and it
didn't have the function. RH7.0 is still on my system, so I did a
chroot and ran it's python (I had upgraded it to 2.0). It had the
function, which gave me 1000. (Intel PII, 64MB RAM)
| Sheila King
It is probably a good idea to upgrade to 2.0. One of the cool new
features is the "+=" operator. If you are going to stick with 1.5.2,
I can give you a copy of the 1.5.2 docs.