摘要: Vector2d v0 版本: # vector2d_v0.py import math from array import array class Vector2d: typecode = 'd' # 转换为字节时的存储方法,d 代表8个字节的双精度浮点数 def __init__(self, x 阅读全文
posted @ 2022-02-05 23:25 chuangzhou 阅读(310) 评论(0) 推荐(0) 编辑
摘要: >>> class A: ... def __init__(self,name): ... self.__name = name ... >>> a = A('xiaoming') >>> a.name # 私有化,外部不能直接访问 Traceback (most recent call last) 阅读全文
posted @ 2022-02-05 22:48 chuangzhou 阅读(88) 评论(0) 推荐(0) 编辑