如何列出一个模块中的所有函数?
如何列出一个模块中的所有函数?
我在系统中安装了一个Python模块,我想查看其中可用的函数/类/方法。
我想在每个函数上调用help
函数。在Ruby中,我可以像ClassName.methods
这样做,以获取该类上可用的所有方法列表。在Python中是否有类似的功能?
例如,像这样的东西:
from somemodule import foo print(foo.methods) # or whatever is the correct method to call
admin 更改状态以发布 2023年5月21日