gpt4 book ai didi

python - 在 PyDev 中显示函数文档

转载 作者:IT老高 更新时间:2023-10-28 20:55:16 26 4
gpt4 key购买 nike

我已经启动并运行了 Pydev,几乎一切都运行良好。但是我在使用文档字符串时遇到了一些问题。

假设我有一个函数,如下所示:

def _get_logging_statement(self):
"""Returns an easy to read string which separates items in the log file cleanly"""
result = "\n\n#============================================="
result += "\n# %-80s#"(self)
result =+ "\n\n#============================================"
return result

假设我已覆盖 repr 以正确格式化该字符串。

当我在 Eclipse 中将鼠标悬停在它上面时,它会按预期显示完整的文档字符串。但是,完整的实现也显示在 doctsting 下方。

有没有办法显示文档字符串?

最佳答案

目前看起来不像。谷歌搜索了这个问题,最高的结果指向了这个 Pydev-users post :

On Mon, May 3, 2010 at 5:45 AM, Janosch Peters wrote:

Hi,

when I hover over a function or class, I get a tooltip showing the whole definition of the function/class not only the docstring (as I would expect).

Is this expected behaviour? I think it would be more useful, if only the content of the docstring is shown.

目前是预期的。请输入要进行的功能请求 仅显示文档字符串一个选项。

干杯,

法比奥

查看了 Pydev 错误/功能跟踪器,并没有找到输入的这个特定问题。您可能想在 Pydev 功能请求跟踪器中输入它,看看是否可以在那里获得帮助。

关于python - 在 PyDev 中显示函数文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4451645/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com