function decorator

decorator

Add functions before and after the original function, and should not use the calling method of the original function

spelling

  def timmer(fun):

    def wapper ():

      res = fun()

      return res

    return wapper

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324890934&siteId=291194637