鉴于Python函数:
def a_method(arg1, arg2): pass
如何提取参数的数量和名称.即,鉴于我有一个func的引用,我想要返回func.[something]("arg1","arg2").
这种情况的使用场景是我有一个装饰器,我希望使用方法参数的顺序与它们为实际函数出现的顺序相同.也就是说,当我调用aMethod("a","b")时,装饰器看起来会打印出"a,b"吗?
python introspection decorator python-datamodel
decorator ×1
introspection ×1
python ×1
python-datamodel ×1