[Python-Dev] Python 2.3a1's mandatory use of cyclic GC causes existing applications to fail

Thomas Heller theller@python.net
05 Feb 2003 19:39:24 +0100


Tim Peters <tim.one@comcast.net> writes:

> Note too that people can get back more memory than gc consumes by declaring
> new-style classes to use __slots__.  That's a new memory-optimization
> gimmick, and an effective one.

Is there *any* other way to get the same effect as '__slots__ = []'
except inserting this is the code? A flag in the C coded base class?

I constantly forget to use this in subclasses I define.
I know I can use a __metaclass__ for this, but I'm looking for other ways.

Thomas