used to intercept all attributes generically to understand this codeit' crucial to notice that the attribute assignments inside the __init__ constructor method trigger property setter methods too when this method assigns to self namefor exampleit automatically invokes the setname methodwhich transforms the value and assigns it to an instance attribute called __name so it won' clash with the property' name this renaming (sometimes called name manglingis necessary because properties use common instance state and have none of their own data is stored in an attribute called __nameand the attribute called name is always propertynot data as we saw in names like __name are known as pseudoprivate attributesand are changed by python to include the enclosing class' name when stored in the instance' namespaceherethis helps keep the implementation-specific attributes distinct from othersincluding that of the property that manages them in the endthis class manages attributes called nameageand acctallows the attribute addr to be accessed directlyand provides read-only attribute called remain that is entirely virtual and computed on demand for comparison purposesthis propertybased coding weighs in at lines of codenot counting its two initial linesand includes the object derivation required in but optional in xfile validate_properties py class cardholder(object)acctlen retireage need "(object)for setter in class data def __init__(selfacctnameageaddr)self acct acct instance data self name name these trigger prop setters tooself age age __x mangled to have class name self addr addr addr is not managed remain has no data def getname(self)return self __name def setname(selfvalue)value value lower(replace('' 'self __name value name property(getnamesetnamedef getage(self)return self __age def setage(selfvalue)if value raise valueerror('invalid age'elseself __age value age property(getagesetageexampleattribute validations