python - Python 中声明的 Doxygen 行尾注释

标签 python doxygen

在 C/C++ 中,您可以强制 doxygen 识别注释适用于一行中它前面的文本。任何这些:

int my_variable;                 /*!< This is my variable */
int my_variable;                 /**< This is my variable */
int my_variable;                 //!< This is my variable
int my_variable;                 ///< This is my variable

将字符串添加到 my_variable 的文档中.在 Python 中尝试等效项似乎不起作用。这有效:

## This is my variable
my_variable = None

这个:

my_variable = None               ## This is my variable
my_other_variable = None

将文档附加到 my_other_variable ,如您所料,但这两者:

my_variable = None               ##< This is my variable
my_variable = None               #!< This is my variable

似乎只是丢弃了文档。有没有办法做相当于//!<在 Python 中?

最佳答案

不,目前不支持。

Python 的解析器是由几个学生提供的。虽然他们总体上做得很好,但他们没有实现 C/C++ 可用的所有功能。

缺少的两个最显着的功能是:

希望我能抽空在将来添加这些,但欢迎任何帮助。

关于python - Python 中声明的 Doxygen 行尾注释,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/6179305/

相关文章:

python - 将 MATLAB 边界椭球代码移植到 Python

objective-c - doxygen 链接到类别中的 Objective-C 方法

c++ - 如何在 doxygen 中显示 C++ 样式包含语法

javascript - 将 JS 对象提取为 JSON

python - 如何在继承文件的装饰器函数中获取python文件名

documentation - 配置 "Class List" View 默认使用Level 2?

doxygen - 如何在我的doxygen文档中添加外部资源(pdf文件)

boost - Boost 库的 Doxygen 文档?

python - matplotlib 中的自定义对数轴缩放

python - 为什么 cProfile 模块不适用于 unittest?