On Tue, Apr 12, 2016 at 9:10 AM, Steven D'Aprano <st...@pearwood.info> wrote: > Hence "self.things" will return the same > list each time, the one defined as a class attribute, regardless of > which "self" does the lookup. > > If a method were to assign to the attribute, for example "self.things = []", > that would create an instance attribute, but that doesn't happen.
Indeed. And the __del__ method is guaranteed always to raise an exception; by the time __del__ gets called, there can't be any references to the object anywhere, so it can't be in that list any more... ChrisA -- https://mail.python.org/mailman/listinfo/python-list