【发布时间】:2017-07-24 13:45:58
【问题描述】:
我想在另一个模块的另一个方法(比如module_1.py)中添加一个链接到一个模块(比如module_2.py)中的一个类的方法。我希望该链接可以在 Sphinx 中使用。
假设:
module_1.py
class ABC:
def foo(self):
"""
See docstring of module_2.py bar():<link to bar() in module_2.py>
"""
print("foo")
module_2.py
class XYZ:
def bar(self):
"""
This function prints hello.
"""
print("hello")
【问题讨论】:
标签: python python-3.x python-sphinx docstring