求教一下大神们,为什么我使用 ctrl+Q 快捷键调用函数的说明文档,跟使用 print(函数名称.__doc__)输出的内容会不一样?
比如我要查看 cv2.namedWindow 的说明文档,使用 ctrl+Q 的结果:
def namedWindow(winname: str,
flags: int = ...) ->
简单的不能再简单。似乎只调用了头文件???
而使用 print(cv2.namedWindow.__doc__),就能输出完整的函数说明文档:
namedWindow(winname[, flags]) -> None
. @
brief Creates a window.
.
. The function namedWindow creates a window that can be used as a placeholder for images and
. trackbars. Created windows are referred to by their names.
.
. If a window with the same name already exists, the function does nothing.
.
. You can call cv::destroyWindow or cv::destroyAllWindows to close the window and de-allocate any associated
请问一下问题在哪里?应该如何解决?
同一个函数,在 jupyter 工具下是可以通过快捷键直接调用完整的说明文档,但在 pycharm 中暂时没有找到办法。
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://yangjunhui.monster/t/1112929
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.