开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜