【问题标题】:function name + tab does not return docstring in IPython函数名 + 选项卡在 IPython 中不返回文档字符串
【发布时间】:2014-04-03 23:02:57
【问题描述】:

在IPython中,我习惯写

函数(

然后点击一个制表符,获取文档字符串的内容和命名参数的列表。但是,自从我安装了 IPython 2.0 后,这停止了工作。有解释或已知的解决方法吗?

【问题讨论】:

    标签: ipython ipython-notebook jupyter-notebook docstring tab-completion


    【解决方案1】:

    哦,现在的快捷方式是shift+tab

    【讨论】:

    • 可以在 jupyter notebook 中使用,但遗憾的是不能在 ipython 终端中使用...
    【解决方案2】:

    Shift-tab 仅在您将编辑光标置于内部 对象时有效。不是在对象的开始。这个问题没有记录在任何地方......!

    我提交了 jupyter 问题 Shift-Tab completion doesn't work when edit cursor is at the start of the object #1902

    【讨论】:

    • 一直在想为什么我的文档字符串都没有出现哈哈哈..谢谢
    【解决方案3】:

    要在 Python 中显示文档字符串,可以使用 ? 字符作为简写。

    您可以将? 字符放在要查找文档的对象之前或之后(不允许空格)。

    要访问源代码,只需使用??

    来源:Help and Documentation in IPython

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2012-02-18
      • 1970-01-01
      • 2014-01-07
      • 1970-01-01
      • 1970-01-01
      • 2010-12-24
      • 1970-01-01
      相关资源
      最近更新 更多