摘要:
Vector2d v0 版本: # vector2d_v0.py import math from array import array class Vector2d: typecode = 'd' # 转换为字节时的存储方法,d 代表8个字节的双精度浮点数 def __init__(self, x 阅读全文
摘要:
>>> class A: ... def __init__(self,name): ... self.__name = name ... >>> a = A('xiaoming') >>> a.name # 私有化,外部不能直接访问 Traceback (most recent call last) 阅读全文