This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: Incorrect return value in gc docs
Type: Stage:
Components: Documentation Versions: Python 2.4
process
Status: closed Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: iamfenris, quiver
Priority: normal Keywords:

Created on 2005-03-11 16:28 by iamfenris, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (4)
msg24559 - (view) Author: Aravind (iamfenris) Date: 2005-03-11 16:28
The document

http://www.python.org/doc/current/lib/module-gc.html

notes that gc.isenabled() returns true, while it
actually returns 1. 

The description reads:
isenabled(  	)
    Returns true if automatic collection is enabled.

Suggested correction:
isenabled(  	)
    Returns 1 if automatic collection is enabled.

HTH,
-Aravind
msg24560 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2005-03-12 07:46
Logged In: YES 
user_id=671362

This document is for Python 2.4.
  http://www.python.org/doc/current/lib/

Are you sure your Python has the same version number as 
this?
I guess you're using Python(say, 2.2) that doesn't have a built-
in bool type.
msg24561 - (view) Author: Aravind (iamfenris) Date: 2005-03-12 14:07
Logged In: YES 
user_id=1237322

Oops! I apologise -- I have both 2.3.4 and 2.4 running on my
machine, and the return value was 1 with 2.3.4 but the
correct True with 2.4. 
This is not a bug.

-Aravind
msg24562 - (view) Author: George Yoshida (quiver) (Python committer) Date: 2005-03-12 14:51
Logged In: YES 
user_id=671362

Looks like so.
CVS log of gcmodule.c shows that isenabled function has 
changed to return True/False instead of 1/0 since 2.4.

http://cvs.sourceforge.net/viewcvs.py/python/python/dist/src/M
odules/gcmodule.c?r1=2.75&r2=2.76

History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41682
2005-03-11 16:28:43iamfenriscreate