请大神指点: 如果类有多个属性,可以通过setter一次性对全部属性值进行设置吗?
比如:
class A():
def __init__(self, x=0, y=0):
self.x = x
self.y = y
@property
def a(self):
...
@a.setter
def a(self, x, y):
self.x = x
self.y = y
>>z = A(2, 3)
>>z.a = 4, 5
@oyljerry