类的行为的定义可以像内置函数那样自然 类的设计 装饰器@classmethod 操作类,而不是操作实例的方法。 若类要实现可散列,必须实现__ hash __ 和 __ eq __方法 实例属性的制度属性 加@property装饰器
本文标题:第九章
本文链接:https://www.haomeiwen.com/subject/uqkhzftx.html
网友评论