I've recently learned about the @property decorator, but there is (at least) one thing I don't understand about it yet. In this class below, my_name is obviously the property name, but it's not at all clear how the value actually gets assigned. The only assignments are to the underscored _my_name variable, but how does the decorator know that self._my_name corresponds to the my_name property?
class Person:
def __init__(self, input_name):
self._my_name = input_name
@property
def my_name(self):
return self._my_name
@my_name.setter
def my_name(self, value):
self._my_name = value