摘要: @classmethod 有的时候在类中会有一种情况,就是这个方法并不需要使用每一个对象属性 因此 这个方法中的self参数一个完全无用的参数,使用classmethod class A: __count = 0 # 隐藏类count属性 def __init__(self, name): self 阅读全文
posted @ 2019-05-27 22:04 我兜里有块糖 阅读(262) 评论(0) 推荐(0) 编辑
目录代码