New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Python ignores \private tag (Origin: bugzilla #595186) #3515

Closed
doxygen opened this Issue Jul 2, 2018 · 0 comments

Comments

Projects
None yet
1 participant
@doxygen
Owner

doxygen commented Jul 2, 2018

status RESOLVED severity normal in component general for ---
Reported in version 1.6.0 on platform Other
Assigned to: Dimitri van Heesch

On 2009-09-14 16:02:25 +0000, Joe Longson wrote:

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"

On 2015-05-01 14:01:50 +0000, Fabian Raab wrote:

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).

On 2015-12-27 12:31:55 +0000, albert wrote:

I've just pushed a proposed patch to github (pull request 432)

On 2015-12-27 14:02:20 +0000, albert wrote:

Changes have been integrated in github master version

On 2015-12-30 10:19:07 +0000, Dimitri van Heesch wrote:

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).

@doxygen doxygen closed this Jul 2, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment