I would like to understand how the built-in function property works. What confuses me is that property can also be used as a decorator, but it only
property
Documentation says it's just a shortcut for creating readonly properties. So
@property def x(self): return self._x
is equivalent to
def getx(self): return self._x x = property(getx)