Tagged articles
3 articles
Page 1 of 1
IT Services Circle
IT Services Circle
May 10, 2026 · Fundamentals

Why Does Python Use a Leading Underscore for Some Variables?

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
Why Does Python Use a Leading Underscore for Some Variables?
21CTO
21CTO
Jan 15, 2018 · Fundamentals

Master Python Encapsulation & Inheritance: Public vs Private Variables Explained

This article explains Python's object-oriented principles, illustrating how encapsulation hides data through public and private instance variables, demonstrates getter/setter methods, and shows inheritance by extending classes, all accompanied by clear code examples.

EncapsulationInheritanceOOP
0 likes · 9 min read
Master Python Encapsulation & Inheritance: Public vs Private Variables Explained