输出是否help(something)
遵循一些易于在 html 中格式化的标记语言?我知道pydoc -w [topic]
但有两个问题:
- 风格的定制并不容易(http://bugs.python.org/issue10716)和
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