Inheriting from 'object' introduces cycled reference.
Jason Orendorff
jason at jorendorff.com
Tue Jan 15 11:10:28 EST 2002
Kerim Borchaev wrote:
> Subject: Inheriting from 'object' introduces cycled reference.
> Is it intended behavior?
Yes. The cycle is caused by a weak back-reference from 'object'
to the subclass. That weak reference is used to implement
the new __subclasses__() method that types now have.
Note that the cycle doesn't prevent types from being GC'd nicely.
## Jason Orendorff http://www.jorendorff.com/
More information about the Python-list
mailing list