Spyder 中的精美 python 文档

Fancy python docs in Spyder

我正在 Python 中使用 Spyder 作为 IDE 编写一些文档。

例如我有一个函数:

def TestFunction(args1,args2):
    """
    General Description

    Args:
        args1: describing
        args2: describing
    Return:
        data
    """
       ...code here....

是否可以使用粗体或斜体等字样使文档更美观? 有参考资料吗?

谢谢

(此处为 Spyder 维护者) 遵循重组文本的约定可以使您的文档更加精美。你可以找到它的规格 here.

我经常使用 numpy,所以我安装了 numpydoc 它在首选项下的帮助中启用了 'automatic connections'。

做的不错