关于作者

Discuss / Python / 第二题

第二题

Topic source

有点小忧桑3264965311_125

#1 Created at ...

import functools def log(text =''): def decorator(func): @functools.wraps(func) def wrapper(args,**kw): print('begin call',text) func(args,**kw) return print('end call') return wrapper return decorator @log() def f(): print('f')

f()


  • 1

Reply

WARNING: You are using an old browser that does not support HTML5. Please choose a modern browser (Chrome / Microsoft Edge / Firefox / Sarafi) to get a good experience.