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

浙公网安备 33010602011771号