class Person(object): population = 0 def __init__(self): print 'inc' Person.population += 1 def __del__(self): print 'del' print type(Person) print type(self.__class__) Person.population -= 1 tome = Person()