[英]how to check details of user defined function in jupyter notebook?
I am trying to see the details of user defined function in jupyter notebook.我试图在 jupyter 笔记本中查看用户定义的 function 的详细信息。 I tried with.
我试过了。 Shift + Tab but that did not work, I think it is a command for see details of inbuilt function.
Shift + Tab 但这不起作用,我认为这是查看内置 function 详细信息的命令。 How can I check what I need in...
我怎样才能检查我需要什么...
You can do this with the built-in inspect library.您可以使用内置的检查库来执行此操作。
def hello_world():
print("hello_world")
import inspect
source = inspect.getsource(hello_world)
print(source)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.