#!/usr/bin/python #python 2.7.3 class Person: population = 0 # class variable def __init__(self, name): self.name = name print '(Initializing %s)'% self.name Person.population += 1 def __del__(self): print "%s says bye." % self.name Person.population -= 1 if Person.population == 0: print "I am the last one" else: print 'There are %d more people.' % Person.population zaky = Person('mithilesh') # If zaky is changed to z, za or zak, program runs without Exception AttributeError: "'NoneType' object has no attribute aakash = Person('aakash')