Use self to reference properties : self « Class « Python Tutorial






class C1():                      
    def setname(self, who):      
        self.name = who          

I1 = C1(  )                      
I2 = C1(  )
I1.setname('A')               
I2.setname('B')               
print I1.name








11.7.self
11.7.1.How to Declare Classes
11.7.2.self.__class__.__name__ represents the name of the class
11.7.3.Use self to reference properties