2016年3月4日

摘要: python基础知识讲解——@classmethod和@staticmethod的作用 在类的成员函数中,可以添加@classmethod和@staticmethod修饰符,这两者有一定的差异,简单来说: @classmethod 必须有参数cls,在继承的子类中传入的cls变量为子类 @stati 阅读全文
posted @ 2016-03-04 00:06 pylinux 阅读(839) 评论(0) 推荐(1)
摘要: python基础知识讲解——@classmethod和@staticmethod的作用 在类的成员函数中,可以添加@classmethod和@staticmethod修饰符,这两者有一定的差异,简单来说: @classmethod 必须有参数cls,在继承的子类中传入的cls变量为子类 @stati 阅读全文
posted @ 2016-03-04 00:01 pylinux 阅读(134) 评论(0) 推荐(0)

导航