在 PyDev 中显示函数文档
我已经启动并运行了 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 中时,它会按预期显示完整的文档字符串。然而,完整的实现也显示在文档下方。
有没有办法仅显示文档字符串?
I've gotten Pydev up and running, and almost all is working well. However I'm having some trouble with docstrings.
Let's say for instance I have a function such as the following:
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
Assume I've overridden repr to format that string properly as well.
When I hover over this in Eclipse it shows me the full docstring as intended. However, the full implementation is also displayed below the doctsting.
Is there a way to only display the docstring?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
目前看起来不像。谷歌搜索这个问题,最上面的结果向我指出了这个 Pydev 用户帖子:
查看了 Pydev 错误/功能跟踪器,没有发现输入的这个特定问题。您可能想将其输入 Pydev 功能请求跟踪器中,看看是否可以在那里获得帮助。
Doesn't look like it currently. Googled around for this issue and the top result pointed me to this Pydev-users post:
Looked around the Pydev bug/feature tracker and didn't find this specific issue entered. You might want to enter it in the Pydev feature request tracker and see if you can get help there.
我已在 PyDev bug tracker 中提交了功能请求,ID 为 863。
如果您也想要此票,请考虑投票支持此票。 (也许也在这里投票)
I have submitted a feature request in the PyDev bug tracker, with ID 863.
Consider vote up to this ticket if you also want this. (And maybe vote up here, too)