python类中的other是什么? def add(self, other): return Coordinate(self.x + other.x, self.y + other.y)
other只不过是个形参,它到底是个什么你要去看传递的时候到底传入了个什么实参啊从代码上来看,它跟self一样的类型,所以才能相加
https://blog.csdn.net/qq_28143929/article/details/108923137?utm_source=app&app_version=5.5.0&code=app_1562916241&uLinkId=usr1mkqgl919blen计算两点之间距离的类
是add函数的参数啊