python @property @x.setter
class a: @property def x(self): return 1 @x.setter def x(self,value): pass a1= a() y = a1.x print(y) a1.x = 2 print(y)
1 1
class a: @property def x(self): return 1 @x.setter def x(self,value): pass a1= a() y = a1.x print(y) a1.x = 2 print(y)
1 1