Skip to content

logtimewithname

pythonstar edited this page Dec 2, 2016 · 1 revision

功能

该装饰器打印一个函数的别名及其耗时。若别名为None则打印函数名,意义同logtime

参数

字符串,默认为None,不填则打印函数名

返回值

示例

@star.logtimewithname()
def test1():
    pass

@star.logtimewithname(u"测试")
def test2():
    pass

Clone this wiki locally