python 中三种定义类的方式

在Python中方,有三种定义类的方法: 常规方式、@classmethod修饰方式、@staticmethod修饰方式python class类定义 In [1]: class A: ...: def common(self,x): ...: print "executing common(%s,%s)"% (self,x) ...: p
相关文章
相关标签/搜索