replacing the class of an instance

Bill Janssen janssen at parc.xerox.com
Fri Sep 24 17:17:21 EDT 1999


Excerpts from direct: 24-Sep-99 Re: replacing the class of .. David
Ascher at ski.org (743*)

> you may be able to rip out the guts (aka the
> methods and class attributes) of the class that the instances all share
> and squeeze in the new class as a base class of the original class.  That
> would avoid having to deal with circular references.

Ah, just the kind of trick I like.  That would avoid the need to keep a
list of all the instances, and the resultant GC problems that would
cause.

Bill




More information about the Python-list mailing list