标签:pre other pytho add init 运算符 剑指offer 赋值运算 style
class aa(object): def __init__(self,x): self.val=x def __add__(self,other): x=self.val-other.val return x a=aa(10) b=aa(2) c=b+a print(c)
标签:pre other pytho add init 运算符 剑指offer 赋值运算 style
原文地址:https://www.cnblogs.com/xzm123/p/9847776.html