python @classmethod 和 @staticmethod的区别
摘要:
@classmethod: 和 @staticmethod: 两种方式 都可以通过类直接调用, 当然也都可以 通过 实例进行调用 区别:@classmethod 可以调用本身类里的其他方法,而 @staticmethod不可以调用类里的其他方法 普通方法则需要 使用 实例 进行 调用 该方法 而d( 阅读全文
posted @ 2018-11-13 20:32 游荡的鱼 阅读(148) 评论(0) 推荐(0) 编辑