1. Python Software Foundation. "9. Classes - 9.6. Private Variables". The Python 3 Tutorial. Retrieved from https://docs.python.org/3/tutorial/classes.html#private-variables. This official documentation explains the name mangling mechanism for attributes prefixed with a double underscore (), which is the technique used in the snippet to implement data hiding, a core component of encapsulation.
2. Guttag, J. V. (2016). Introduction to Computation and Programming Using Python, With Application to Understanding Data (2nd ed.). MIT Press. In Chapter 8, "Classes and Object-Oriented Programming," the text describes encapsulation as the bundling of data and the methods that operate on that data. The provided snippet, with its class containing both an attribute and methods to manipulate it, is a direct implementation of this concept.
3. Lutz, M. (2013). Learning Python (5th ed.). O'Reilly Media. In Chapter 28, "Class Coding Details," the section "Name Mangling in Classes" (p. 888) details how the X naming pattern is used to create class-private names. This feature is explicitly designed to prevent name clashes and to support the OOP principle of data hiding, which is integral to encapsulation.