Why won\'t this work? I\'m trying to make an instance of a class delete itself.
>>> class A(): def kill(self): del self >>>
what you could do is take the name with you in the class and make a dictionairy:
class A: def __init__(self, name): self.name=name def kill(self) del dict[self.name] dict={} dict["a"]=A("a") dict["a"].kill()