class A: def __init__(self, a): self.a = a print('In A.__init__()') def __del__(self): print('Goodbye from A()')
class B: def __init__(self): self.b = A(self) # Reference cycle print('In B.__init__()') def __del__(self): print('Goodbye from B()') b = B() del b Regards, Marco -- Marco Buttu -- https://mail.python.org/mailman/listinfo/python-list