Tagged articles
5 articles
Page 1 of 1
Test Development Learning Exchange
Test Development Learning Exchange
Sep 30, 2024 · Fundamentals

Understanding Data Encapsulation and Private Attributes in Object‑Oriented Programming (Python Examples)

This article explains the concept of data encapsulation and the role of private attributes in object‑oriented programming, illustrating their benefits and usage through multiple Python code examples covering simple classes, private methods, inheritance, property decorators, and descriptors.

EncapsulationOOPPython
0 likes · 8 min read
Understanding Data Encapsulation and Private Attributes in Object‑Oriented Programming (Python Examples)
MaGe Linux Operations
MaGe Linux Operations
Sep 15, 2017 · Fundamentals

Master Python OOP: Classes, Inheritance, and Object Lifecycle Explained

This article introduces Python's object‑oriented programming fundamentals, covering class definitions, class and instance variables, the __init__ constructor, the role of self, inheritance, method overriding, built‑in class attributes, garbage collection, and private members, complemented by illustrative code snippets.

Garbage CollectionInheritanceOOP
0 likes · 9 min read
Master Python OOP: Classes, Inheritance, and Object Lifecycle Explained
MaGe Linux Operations
MaGe Linux Operations
Mar 14, 2017 · Fundamentals

Why Python’s Double Underscore Doesn’t Guarantee True Privacy

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
Why Python’s Double Underscore Doesn’t Guarantee True Privacy