Home
Sign Up
Sign In
tongjie's recent timeline updates
tongjie
V2EX member #185368, joined on 2016-08-04 11:32:03 +08:00
tongjie
提问
技术话题
好玩
工作信息
交易信息
城市相关
tongjie's recent replies
Aug 8, 2016
Replied to a topic by
SlipStupig
›
Python
›
想请教一下 python 装饰器的作用
def safe_run(_logger):
def _run_once(func):
def f(*args,**kwargs):
try:
return func(*args,**kwargs)
except:
_logger.error(traceback.format_exc())
return f
return _run_once
在要执行的方法前面加上这个装饰器,放心多了;
»
More replies by tongjie
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Solana
·
1737 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 19ms ·
UTC 16:15
·
PVG 00:15
·
LAX 09:15
·
JFK 12:15
♥ Do have faith in what you're doing.
❯