python – 覆盖二维向量类中的__mul__以保持传播性

python – 覆盖二维向量类中的__mul__以保持传播性

我已经定义了以下类: class Point(object): def __repr__(self): return (+str(self.x)+,+str(self.y)+) def __init__(self, x, y): self.x = x self.y = y def __add__(self,

联系我们

联系我们

0577-28828765

在线咨询: QQ交谈

邮箱: xwei067@foxmail.com

工作时间:周一至周五,9:00-17:30,节假日休息

返回顶部