IndexError: tuple index out of range
class Vector2d: typecode = 'd'#'d' float 8 typecode 是类属性 在 Vector2d 实例和字节序列之间转换时使用 def __init__(self,x,y): #把 x 和 y 转换成浮点数,尽早捕获错误,以防调用 Vector2d 函数时传入不当参数 self.x = float(...
原创
2018-12-09 20:39:50 ·
71052 阅读 ·
0 评论