我正在使用工具pydoc自动生成文档。鉴于函数:
def sum(a, b):
"""Returns the sum of a and b."""
return a + b
我很好奇是否有一种结构化的方式使用 Markdown 来突出显示对函数参数标签的引用?例如:
"""Returns the sum of 'a' and 'b'."""
"""Returns the sum of `a` and `b."""
"""Returns the sum of *a* and *b*."""
"""Returns the sum of **a** and **b**."""
类似于这个问题在 Python 文档字符串中引用参数,它是关于使用 Sphinx 而不是 pydoc。
另请注意,我对引用函数参数的标签(而不是类型)感到好奇。
呼如林
随时随地看视频慕课网APP
相关分类