摘要: 如果想根据现有对象复制出新的对象并对其修改,可以考虑原型模式(Prototype Pattern)class Point: __slots__ = ("x", "y") def __init__(self, x, y): self.x = x self.y =... 阅读全文
posted @ 2015-07-21 10:31 第八片叶子 阅读(1376) 评论(0) 推荐(0) 编辑