-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Demangled name of private Python class field not correctly handled #10241
Comments
Currently doxygen does, apparently, not know anything about this "aliasing" / "demangling" of variable names.
|
From docs.python.org: https://docs.python.org/3/tutorial/classes.html#private-variables |
Thanks for the reference, has to be studied a bit. One sentence that caught my eye was:
so a nice uncertain formulation again... |
Just like almost everything in Python... This is why the new conventions which were imposed in doxygen 1.9.6 (#10231) from a vague convention of some Python programmers, and against the traditional way of using one single underscore, can be considered as excessive. |
To be precise, this one is not about the name mangling after a double underscore, the complete sentence is:
The sentence applies to identifiers with a single underscore, the old traditional convention that doxygen 1.9.6 decided to break (#10231) without notice nor option to revert to the previous behavior (OK, I admit that I am a bit insistent...) |
This problem was briefly mentioned as part of #10231. However, #10231 was about another more general problem for which there is no consensus. This specific point is a bug.
Consider a Python class with a private field
__a
("private" in the sense of #10231). According to Python rules, the actual (demangled) name of__a
is_C__a
, typically for disambiguated access.The execution proves that
__a
and_C__a
are the same:However, doxygen does not recognize
_C__a
as the demangled form of__a
:The variable
__a
is recognized as private and does not require documentation. However,_C__a
is considered as an independent non-private variable and doxygen complains about the absence of documentation.In the generated HTML, a "protected attribute" named
_C__a
is listed, without documentation.Reproduction: doxybug5.zip
The text was updated successfully, but these errors were encountered: