![](/img/trans.png)
[英]Documenting math formulas as comments in python code using Doxygen
[英]Doxygen end of line comments on declarations in Python
在 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++ 可用的所有功能。
缺少的兩個最顯着的功能是:
希望我將來可以添加這些,但歡迎提供任何幫助。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.