[Tutor] strange recursion result

Sheila King sheila@thinkspot.net
Mon, 08 Jan 2001 13:54:01 -0800

On Mon, 8 Jan 2001 11:34:43 -0500, D-Man <dsh8290@rit.edu>  wrote about Re:
[Tutor] strange recursion result:

:On Mon, Jan 08, 2001 at 01:25:04PM -0800, Sheila King wrote:

:| >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.)
:Using python 1.5.2 ;-).

Ah, thanks.

: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.

Right. I've gone over the changes between 2.0 and previous versions, but I
guess this one didn't stick in my head, or something. Hmm. Or else, it's not
noted in the docs.

: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.

Well, I'm trying to use (close) to the same version as on my webhost. They are
running 1.5.1 right now. I asked them to upgrade to 2.0, but they have a lot
of other stuff going on right now, and don't want to, yet. (Plus, I guess they
are using Python for some of their system scripts, and don't want stuff to

I do have a copy of the 1.52 docs local on my machine. Thanks.

Sheila King