Message26375
The __dict__ attribute of some objects is read-only,
e.g. for type objects. However, there is a generic
way to still access and modify it (without hacking with
gc.get_referrents(), that is). This can lead to
obscure crashes. Attached is an example that shows
a potential "problem" involving putting strange keys
in the __dict__ of a type.
This is probably very minor anyway. If we wanted to
fix this, we would need a __dict__ descriptor that
looks more cleverly at the object to which it is
applied.
BTW the first person who understand why the attached
program crashes gets a free coffee. |
|
Date |
User |
Action |
Args |
2007-08-23 14:34:48 | admin | link | issue1303614 messages |
2007-08-23 14:34:48 | admin | create | |
|