Quick GC question

Michael Hudson mwh at python.net
Mon Dec 3 06:12:23 EST 2001


forgottengentleman_spam at yahoo.com (forgotten gentleman) writes:

> Hi, I understand Python uses a reference counting GC, and an optional
> LISP-like one which takes care of circular refs.

FWIW, I doubt there's a Lisp implementation in existence with a gc
much like Python's.

> Am I guaranteed that the optional GC will be enabled by default, or
> should I get into the habit of typing gc.enable() just in case?

I don't think you'll be able to import gc if it's not enabled in the
build, and if it's enabled in the build, it will be running by
default.  So I don't think there's any need to litter your code with
gc.enable()s.

Cheers,
M.

-- 
8. A programming language is low level when its programs require
   attention to the irrelevant.
  -- Alan Perlis, http://www.cs.yale.edu/homes/perlis-alan/quotes.html



More information about the Python-list mailing list