我pydoc
用来创建文档。但它只显示docstring
一个类和方法,如__init__
. 是否还有任何参数要传递给为类的每个方法pydoc
创建文档?
例子:
class myclass(some_other_class):
"""
This is 'class' docstring.
"""
def __init__(self):
"""
This is docsctring for __init__ method.
"""
pass
def mymethod(self, some_parameter):
"""
This is docstring for mymethod function.
"""
pass
现在,当我在此代码上使用 pydoc 时,我看不到“这是 mymethod 函数的文档字符串”。在生成的输出中。