假设我有以下文件结构:
+mypackage/
foo.m
bar.m
如何在help(mypackage)
输出中添加帮助信息?
在Python中,我只需要在__init__.py
中添加文档字符串。这里的等效方法是什么?
假设我有以下文件结构:
+mypackage/
foo.m
bar.m
如何在help(mypackage)
输出中添加帮助信息?
在Python中,我只需要在__init__.py
中添加文档字符串。这里的等效方法是什么?
__init__.py
文档字符串的模拟是一个帮助摘要文件。contents.m
文件来实现所需的行为:+mypackage/
foo.m
bar.m
contents.m
contents.m
文件:% This is contents.m
% This package contains:
% bar - Bar things
% foo - Foo things
>> help mypackage
This is contents.m
This package contains:
bar - Bar things
foo - Foo things