Tagged articles
name mangling
10 articles · Page 1 of 1
The article explains that a leading underscore in Python names signals a non‑public or internal use convention defined by PEP 8, describes its practical effects on imports and IDE hints, and outlines other underscore naming patterns such as name mangling, trailing underscores, magic methods, and throwaway variables.
PEP 8Pythonname mangling
0 likes · 6 min read

This article explains the meaning and conventions of single and double leading, trailing, and surrounding underscores in Python identifiers, shows how name mangling works, and provides practical code examples illustrating their effects on classes, modules, and REPL usage.
Pythoncode-examplesname mangling
0 likes · 11 min read

This article explains the low‑level mechanics of extern "C", why placing #include directives inside an extern "C" block can cause name‑mangling and linkage errors, and provides practical guidelines and code examples for safely mixing C and C++ headers.
C interoperabilityC++extern C
0 likes · 16 min read

This article explains the various meanings of single and double underscores in Python, outlines the five common underscore naming patterns, demonstrates how name mangling works for double‑leading underscores, and shows practical uses of the underscore as a throwaway variable and REPL placeholder.
Pythonname manglingnaming conventions
0 likes · 11 min read

This article explains how Python class attributes can be hidden from external code using double‑underscore name mangling, demonstrates the effect with concrete examples, and shows how to provide controlled access through getter, setter, and validation methods.
Getter/Setterclassname mangling
0 likes · 6 min read

This article explains the five underscore naming patterns in Python—single leading, single trailing, double leading, double leading and trailing, and a solitary underscore—detailing their conventions, the name‑mangling mechanism, and how they affect class attributes and imports.
PEP 8Pythondunder
0 likes · 12 min read

This article explains the five underscore naming patterns in Python—single leading, single trailing, double leading, double leading and trailing, and a solitary underscore—detailing their conventions, how name mangling works, and the impact on variable and method behavior with clear code examples.
PEP 8name manglingnaming conventions
0 likes · 12 min read

This article explains Python’s name‑mangling for double‑underscore attributes, how they can still be accessed indirectly, the effects of instance attribute shadowing on class variables, and why deleting certain dict attributes raises errors due to CPython’s underlying implementation.
Pythonattribute shadowingclass methods
0 likes · 3 min read

This article explains the meaning and conventions of single and double leading, trailing, and combined underscores in Python identifiers, demonstrates how name mangling works, and shows practical examples of how these patterns affect variable access, imports, inheritance, and REPL usage.
PEP 8Pythonname mangling
0 likes · 11 min read

This article explains Python’s double‑underscore name‑mangling for private attributes, how they can still be accessed via class methods, the pitfalls of attribute shadowing, and why deleting dict entries may raise errors due to CPython’s underlying C implementation.
CPythonPythonattribute shadowing
0 likes · 4 min read
