__del__ Is a Destructor : del « Class « Python Tutorial






class Life:
    def __init__(self, name='unknown'):
        print 'Hello', name
        self.name = name
    def __del__(self):
        print 'Goodbye', self.name

brian = Life('A')
brian = 'B'

del brian








11.17.del
11.17.1.__del__ Is a Destructor