After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 595186 - Python ignores \private tag
Python ignores \private tag
Status: RESOLVED FIXED
Product: doxygen
Classification: Other
Component: general
1.6.0
Other Linux
: Normal normal
: ---
Assigned To: Dimitri van Heesch
Dimitri van Heesch
Depends on:
Blocks:
 
 
Reported: 2009-09-14 16:02 UTC by Joe Longson
Modified: 2015-12-30 10:19 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Joe Longson 2009-09-14 16:02:25 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"
Comment 1 Fabian Raab 2015-05-01 14:01:50 UTC
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).
Comment 2 albert 2015-12-27 12:31:55 UTC
I've just pushed a proposed patch to github (pull request 432)
Comment 3 albert 2015-12-27 14:02:20 UTC
Changes have been integrated in github master version
Comment 4 Dimitri van Heesch 2015-12-30 10:19:07 UTC
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).