Getting function parameters and variables names and values from decorated function

后端 未结 0 406
执念已碎
执念已碎 2021-01-02 09:06

It is possible to make logger decorator print variable names and values of the decorated funcion

def logger(f):
  def inner(*args):
    print(vars())
  return         


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题