Python language basics 77: class property getters
January 31, 2016 Leave a comment
Introduction
In the previous post we looked at a special group of class level methods called setters. We saw that they were really not different from other class level methods. The single major difference lies in the purpose of setters, which is to let external users of a class provide a value for a class property. We also discussed that a setter may not be available for immutable, read-only or otherwise complex class properties.
In this post we’ll look at the counterpart of setters called getters.