Properties, setter and getter methods
Topics: properties, @property and property(), setters, getters Updated 2020-10-04
Today, I digged a little deeper into the @property decorator, how it is related to the property() function and how its getter and setter methods work. These two links (link1, link2) were really helpful. Of course, there is also the official Python docs on the property() function.
The @property decorator Yesterday we looked at decorators. The @property decorator allows us to create a read-only property.