Python静态方法(staticmethod)和类方法(classmthod)区别

由于对方法和函数二者概念有些混淆,因此研究了一下。后来顺带把静态方法和类方法也摸索了一下,稍微有了一些感受。python 直接上代码:web # coding:utf-8 class Apple: def fun1(self): return 'normal' @staticmethod def fun2(): return 'st
相关文章
相关标签/搜索