Doxygen for Python: How to generate documentation for nested functions

旧时模样 提交于 2019-12-12 04:48:51

问题


I am documenting my Python code using Doxygen. The code makes use of Pythons capability of defining nested functions.

So I have documented them as if they were "normal" functions and set EXTRACT_ALL=YES.

But still, the nested functions cannot be found anywhere. Is there a way to make Doxygen do that?

(Doxygen version 1.8.6)


回答1:


there is no way to access nested functions so im sure it just doesnt document it

 def wrapper():
    def nested(a,b,c):
        return a+b+c
    return nested(1,2,3)

 #a user can call wrapper()
 print wrapper()
 #but there is no way to call nested
 print nested(7,7,7) #ERROR!!!

since a user cannot call it why would you document it?

(really this is just a comment that was too long to post as a comment)



来源:https://stackoverflow.com/questions/29683426/doxygen-for-python-how-to-generate-documentation-for-nested-functions

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!