Python - Getter/Setter Methods
Contents
Setters and getters are implentations of Object Oriented designs where encapsulated data are exposed from the object.
A setter executes an object’s method to update properties of that object.
A getter executes and returns a value from an object’s method.
Method One - property(getter, setter)
|
|
Method Two - Function decorator
|
|