help(something)
的输出是否遵循某种易于在html中格式化的标记语言?我知道pydoc -w [topic]
但是有两个问题:
pydoc -w
某些主题失败(http://stackoverflow.com/a/10333615/1318686)你知道吗下面是help('def')
生成的一些示例输出。它具有其他标记语言的一些典型特征。例如,空格表示代码块,`表示内联代码,**表示突出显示。。。你知道吗
有什么想法吗?你知道吗
谢谢!你知道吗
Function definitions
********************
A function definition
Multiple decorators are applied in
nested fashion. For example, the following code:
@f1(arg)
@f2
def func(): pass
just like a function defined by a lambda form. The "``def``" form is
actually more powerful since it allows the execution of multiple
statements.
**Programmer's note:** Functions are first-class
大多数人使用reStructuredText和Sphinx将其转换为HTML和其他格式。你知道吗
不过,对于如何格式化函数的docstring没有任何要求。你知道吗
相关问题 更多 >
编程相关推荐