Just for instance,
c = myClass()
Attribute
xofmyClassis readonly. Trying to changec.xraises an error.Attributes
aandbofmyClassare connected bya=2*b. When one changes, the other changes automatically too.
c.a = 10
# or setattr(c,'a',10) or c.__setattr('a',10)
# c.b becomes 5
c.b = 10
# c.a becomes 20