开发者

When documenting Python code with doxygen are you supposed to document self parameter?

开发者 https://www.devze.com 2023-04-11 06:13 出处:网络
I have some Python code that was documented with doxygen and I would like to know if it\'s normal to document self parameter for methods?

I have some Python code that was documented with doxygen and I would like to know if it's normal to document self parameter for methods?

Example:

## @par Desc开发者_JS百科ription:
# Some desc
# @note 
#     
# @param something @e string: a string
#    
# @return @b Boolean: True if ...  
#
# @b Example:
# @code
#
#    instance.myMethod("some")
#
# @endcode
def myMethod(self, something):
    return True

What would be the correct doxygen documentation for this method?

Do I have to do something special regarding self parameter?

How do I document the parmeter types, like string, int, list, ...?


I don't know what common practice is, but I wouldn't do it. It just adds clutter to the docs, since its usage is obvious. Clutter in documentation is bad beacuse it obscures the stuff you really want to see.

0

精彩评论

暂无评论...
验证码 换一张
取 消