class Foo : x = 1 f1 = Foo() f2 = Foo() print f1.x print f2.x f1.__class__.__dict__['x'] = 2 print f1.x print f2.x f3 = Foo() print f3.x f3.x = 3 print f2.x print f3.x if f2.x == f2.__class__.__dict__['x'] : print "No change" if f3.x == f3.__class__.__dict__['x'] : print "No change" else : print "Value changed"