流畅的python-读书笔记unit1

from math import hypot class Vector: def __init__(self, x=0, y=0): self.x = x self.y = y def __repr__(self):#__repr__ 和 __str__ 的区别在于,后者是在 str() 函数被使用,或是在用 print 函数打印 一个对象的时
相关文章
相关标签/搜索