第九章

作者: Oppenheim | 来源:发表于2018-10-16 14:17 被阅读7次

    类的行为的定义可以像内置函数那样自然
    类的设计
    装饰器@classmethod 操作类,而不是操作实例的方法。
    要实现可散列,必须实现__ hash __ 和 __ eq __方法
    实例属性的制度属性 加@property装饰器

    相关文章

      网友评论

          本文标题:第九章

          本文链接:https://www.haomeiwen.com/subject/uqkhzftx.html