1
我想通過json模塊並返回只是功能。然後我想使用inspect模塊從json的每個函數返回inspect.formatargspec(* inspect.getfullargspec(func))。Python檢查和函數
這就是我在想什麼,這顯然失敗了,因爲func
是一個字符串。
import inspect
import json as m
for func in dir(m):
if inspect.isfunction(func):
print(func)