On Fri, Apr 30, 2010 at 3:16 PM, Nikolaus Rath <nikol...@rath.org> wrote: > Apparently Python calls the class attribute __del__ rather than the > instance's __del__ attribute. Is that a bug or a feature? Is there any > way to implement the desired functionality without introducing an > additional destroy_has_been_called attribute?
It's a documented feature: http://docs.python.org/reference/datamodel.html#new-style-special-lookup I'm not aware of a way to get around it, so I think you'll need to fall back to checking a flag in the class's __del__ method. -- Jerry -- http://mail.python.org/mailman/listinfo/python-list