10 2016 档案
摘要:class foo(object): def test(self):#这是实例方法 print('object') @classmethod#这是类方法 def test2(clss): print('class') @staticmethod#这是静态方法 def test3(): print('
阅读全文
摘要:第一步:(简单的函数调用) def myfunc() print('myfunc() called.") myfunc() 第二步:(修饰器本质的调用原理,修饰器内调用被修饰的函数) def deco(func): print('before myfunc() called.') func() pr
阅读全文

浙公网安备 33010602011771号