I have a python class object and I want to assign the value of one class variable
class Groupclass(Workerclass): \"\"\"worker class\"\"\" count = 0
When __del__() method called, the Groupclass may be recovered by the garbage collection mechanism, so using Groupclass.xxx may failed. But you can access the count variable through self.__class__.count. Code likes below:
__del__()
self.__class__.count
def __del__(self): self.__class__.count -= 1