Python靜態方法(staticmethod)和類方法(classmthod)區別

由於對方法和函數二者概念有些混淆,因此研究了一下。後來順帶把靜態方法和類方法也摸索了一下,稍微有了一些感受。python 直接上代碼:web # coding:utf-8 class Apple: def fun1(self): return 'normal' @staticmethod def fun2(): return 'st
相關文章
相關標籤/搜索