Message111935
| 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:46 | andrea.corbellini | set | recipients: + andrea.corbellini |
| 2010-07-29 14:19:45 | andrea.corbellini | set | messageid: <1280413185.92.0.0897116981748.issue9417@psf.upfronthosting.co.za> |
| 2010-07-29 14:19:44 | andrea.corbellini | link | issue9417 messages |
| 2010-07-29 14:19:43 | andrea.corbellini | create | |