python 的代码文档

发布于 2024-07-15 10:17:46 字数 1542 浏览 6 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

临风闻羌笛 2024-07-22 10:17:46

约定:PEP 257PEP 8
请注意,文档字符串可以用 reStructuredText 编写

用于生成文档的工具:例如 狮身人面像

Conventions: PEP 257 and PEP 8.
Note, that docstrings can be written in reStructuredText

Tools for generating documentation: for example Sphinx

奶气 2024-07-22 10:17:46

首先,使用 RestructedText 格式将注释放入文档字符串中。

其次,获取sphinx

第三,创建一个使用 autodoc 扩展 的索引。

然后,运行 Sphinx 以获得非常好的文档。

First, put comments in your docstrings using RestructuredText format.

Second, get sphinx.

Third, create an index that uses the autodoc extension.

Then, run Sphinx to get really nice documentation.

温柔嚣张 2024-07-22 10:17:46

Epydoc 也是一个记录源代码的好工具,可以处理交叉引用类、模块、变量等,转换为 HTML、PDF、LaTeX。 还画了一些漂亮的类继承图。 它被许多开源项目使用,因此它的开发相当活跃。

Epydoc is also a good tool for documenting source code, and handles cross-referencing classes, modules, variables, etc, into HTML, PDF, LaTeX. Draws some nice class inheritance diagrams too. It's used by a number of open-source projects, so it's fairly actively developed.

逆光下的微笑 2024-07-22 10:17:46

将代码文档放在代码本身中非常好。 请参阅:

It's very nice to put code documentation in the code itself. See:

数理化全能战士 2024-07-22 10:17:46

将 doxypy 过滤器与 doxygen 一起使用也是一件好事

using doxypy filter with doxygen is a good thing also

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文