__del__ and reference count problem
tiissa
tiissa at nonfree.fr
Thu Apr 21 14:33:03 EDT 2005
ajikoe at gmail.com wrote:
> Your problem can be simplified :
>
> class A:
> pop = 11
> def __del__(self):
> print A.pop
>
> if __name__ == '__main__':
> objA = A()
>
> I got the same error message, and I don't know why ? it looks like the
> class variable can't be accessed from __del__?
It's interesting to note that self.pop instead of A.pop works as expected.
But I don't know why A.pop doesn't.
More information about the Python-list
mailing list