from sys import exit class Bar(object): def __init__(self): print("Bar1 init running") self.bar = self def __del__(self): super().__del__() print("Destructor Bar") b = Bar() exit()
Standard input is empty
Bar1 init running
Exception ignored in: <function Bar.__del__ at 0x14f80cb2e160> Traceback (most recent call last): File "./prog.py", line 9, in __del__ AttributeError: 'super' object has no attribute '__del__'