Python的3个方法:静态方法(staticmethod),类方法(classmethod)和实例方法 【转】

Python的方法主要有3个,即静态方法(staticmethod),类方法(classmethod)和实例方法,以下:html 1python 2函数 3spa 4code 5htm 6blog 7ci 8get 9table 10 11 12 13 14 15 16 def foo(x):     print "executing foo(%s)"%(x)    class A(object)
相关文章
相关标签/搜索