GNOME Bugzilla – Bug 595186
Python ignores \private tag
Last modified: 2015-12-30 10:19:07 UTC
We have several methods in our python code that we want to mark as "private" member functions. However, they don't follow the typical python convention of prepending the name with an underscore: "_". I found the nifty \private tag that you can put into documentation, but the python HTML generator doesn't seem to respect it. (even if I put it in the ## section where such tags are honored). I have also tried using @private. Here is some example code: ## # This is my class class Foo: ## # This is my public method def publicMethod(self): print "public" ## # \private # This is my private method. Don't call me def privateMethod(self): print "private"
To cite the documentation " \private Indicates that the member documented by the comment block is private, i.e., should only be accessed by other members in the same class. Note that Doxygen automatically detects the protection level of members in object-oriented languages. This command is intended for use only when the language does not support the concept of protection level natively (e.g. C, PHP 4). For starting a section of private members, in a way similar to the "private:" class marker in C++, use \privatesection. " so simply use underscore (since it is the convention).
I've just pushed a proposed patch to github (pull request 432)
Changes have been integrated in github master version
This bug was previously marked ASSIGNED, which means it should be fixed in doxygen version 1.8.11. Please verify if this is indeed the case. Reopen the bug if you think it is not fixed and please include any additional information that you think can be relevant (preferably in the form of a self-contained example).