This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author andrea.corbellini
Recipients andrea.corbellini
Date 2010-07-29.14:19:43
SpamBayes Score 0.00026818662
Marked as misclassified No
Message-id <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za>
In-reply-to
Content
Creating a class (either using the 'class' statement or using type()) creates a circular reference.

I've attached a script that simply demonstrates this. The problem is caused by the fact that MyClass.__dict__['__dict__'].__objclass__ is MyClass.

Although most of the times classes are never deleted when the interpreted exits, some programs (like the popular Django framework) create temporary classes. And this is a pain because you can't disable the garbage collector.
History
Date User Action Args
2010-07-29 14:19:46andrea.corbellinisetrecipients: + andrea.corbellini
2010-07-29 14:19:45andrea.corbellinisetmessageid: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za>
2010-07-29 14:19:44andrea.corbellinilinkissue9417 messages
2010-07-29 14:19:43andrea.corbellinicreate