Doxygen for Python:如何为嵌套函数生成文档

时间:2015-04-16 18:45:55

标签: python doxygen nested-function

我正在使用Doxygen记录我的Python代码。该代码利用Pythons定义嵌套函数的功能。

所以我将它们记录为好像是“普通”功能并设置EXTRACT_ALL=YES

但是,在任何地方都找不到嵌套函数。有没有办法让Doxygen这样做?

(Doxygen版本1.8.6)

1 个答案:

答案 0 :(得分:2)

无法访问嵌套函数,所以我确定它不会记录它

 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!!!

因为用户无法调用它,为什么要记录它?

(实际上这只是评论太长而无法发表评论)

相关问题