[Python-Dev] gc.get_referents

Neil Schemenauer nas@python.ca
Tue, 20 Nov 2001 10:48:22 -0800


Barry A. Warsaw wrote:
> Except that you'll have to support both names for backwards
> compatibility.

Most of the stuff in the gc module is low-level, highly dependent on the
GC implementation and may change significantly between releases.  The
only APIs that you can really count on are gc.enable(), gc.disable(),
gc.isenabled(), and gc.collect().  People should not be using
gc.get_referents() in normal code.

On a related note, the gc.DEBUG_LEAK flag should probably be fixed.
It's my understanding that the interpreter can create reference cycles
if certain new features (like nested scopes) are used.  If that's true
then some of the GC debugging options will need to be rationalized.

  Neil