I have an intresting behaviour for the following code:
class MyClass:
def __init__(self):
self.abc = 10
@property
def age(self):
return self.abc
@age.getter
def age(self):
return self.abc + 10
@age.setter
def age(self, value):
self.abc = value
obj = MyClass()
print(obj.age)
obj.age = 12
print(obj.age)
obj.age = 11
print(obj.age)
And I have the following result:
20
12
11
Can somebody explain this behaviour ?