Python 模块帮助 DocStrings - 排除额外文档

问题描述 投票:0回答:1

我编写了一个简单的模块(

testmodule
),它导入了一些其他模块。当我导入它并输入:

help(testmodule)

我也从导入的模块中获得了所有帮助。

有没有办法排除额外的帮助?

python module docstring
1个回答
0
投票

根据docs,您只需将自定义文档字符串放置到测试模块的第一行:

"""Here help for my module"""
import os
...
© www.soinside.com 2019 - 2024. All rights reserved.