Help on sys.getrefcount

Michael Hudson mwh at
Thu Mar 6 14:48:26 CET 2003

Christoph Becker-Freyseng <christoph at> writes:

> I don't see why the refcount is so high (7 or 8 instead 3).

One character strings are cached.

Also, interning.

Basically, don't worry about it for immutable objects.  If you try
lists or something, you'll see results closer to what you expect.


  There's an aura of unholy black magic about CLISP.  It works, but
  I have no idea how it does it.  I suspect there's a goat involved
  somewhere.                     -- Johann Hibschman, comp.lang.scheme

More information about the Python-list mailing list