假设我们有一个函数foo(a, b)是python模块的公共API的一部分. 有什么办法来查询的类型a和b该函数需要? 我知道我可以通过inspect模块获取参数的数量和它们的默认值,但有没有可用的类型信息?
foo(a, b)
a
b
inspect
python types arguments
arguments ×1
python ×1
types ×1